aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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