aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Frost <sfrost@snowman.net>2016-04-08 15:00:44 -0400
committerStephen Frost <sfrost@snowman.net>2016-04-08 15:00:44 -0400
commit689f9a058854a1a32e994818dd6d79f49d8f8a1b (patch)
tree9f5bd8f2cbf49da41e7b5a5f98b41ed6ea4e2f6f
parent8b99edefcab1e82c43139a2c7dc06d31fb27b3e4 (diff)
downloadpostgresql-689f9a058854a1a32e994818dd6d79f49d8f8a1b.tar.gz
postgresql-689f9a058854a1a32e994818dd6d79f49d8f8a1b.zip
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.
-rw-r--r--src/bin/pg_dump/pg_dump.c7
1 files changed, 7 insertions, 0 deletions
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