From: Stephen Frost Date: Fri, 8 Apr 2016 19:00:44 +0000 (-0400) Subject: In dumpTable, re-instate the skipping logic X-Git-Tag: REL9_6_BETA1~226 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=689f9a058854a1a32e994818dd6d79f49d8f8a1b;p=postgresql In dumpTable, re-instate the skipping logic Pretty sure I removed this based on some incorrect thinking that it was no longer possible to reach this point for a table which will not be dumped, but that's clearly wrong. Pointed out on IRC by Erik Rijkers. --- diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 33cd6651d1..6c2167616d 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -14846,6 +14846,13 @@ dumpTable(Archive *fout, TableInfo *tbinfo) DumpOptions *dopt = fout->dopt; char *namecopy; + /* + * noop if we are not dumping anything about this table, or if we are + * doing a data-only dump + */ + if (!tbinfo->dobj.dump || dopt->dataOnly) + return; + if (tbinfo->relkind == RELKIND_SEQUENCE) dumpSequence(fout, tbinfo); else