Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
In dumpTable, re-instate the skipping logic
authorStephen Frost <sfrost@snowman.net>
Fri, 8 Apr 2016 19:00:44 +0000 (15:00 -0400)
committerStephen Frost <sfrost@snowman.net>
Fri, 8 Apr 2016 19:00:44 +0000 (15:00 -0400)
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

index 33cd6651d124af78ad257e2d4c4619cad734b9de..6c2167616dd802a7c25d09380c338660d36ce931 100644 (file)
@@ -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