]> granicus.if.org Git - postgresql/blobdiff - src/bin/pg_dump/pg_dump.c
Fix pg_dump to handle inherited NOT VALID check constraints correctly.
[postgresql] / src / bin / pg_dump / pg_dump.c
index 56c256df8a13d874f401a76f5c2c028649cd5d45..ba1683b79a087c1b4c7fabece70cc3a8c56b7ff0 100644 (file)
@@ -14772,8 +14772,8 @@ dumpConstraint(Archive *fout, DumpOptions *dopt, ConstraintInfo *coninfo)
        {
                /* CHECK constraint on a table */
 
-               /* Ignore if not to be dumped separately */
-               if (coninfo->separate)
+               /* Ignore if not to be dumped separately, or if it was inherited */
+               if (coninfo->separate && coninfo->conislocal)
                {
                        /* not ONLY since we want it to propagate to children */
                        appendPQExpBuffer(q, "ALTER TABLE %s\n",