From 689f9a058854a1a32e994818dd6d79f49d8f8a1b Mon Sep 17 00:00:00 2001 From: Stephen Frost Date: Fri, 8 Apr 2016 15:00:44 -0400 Subject: [PATCH] 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. --- src/bin/pg_dump/pg_dump.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 33cd6651d12..6c2167616dd 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 -- 2.30.2