From 25f1cc7ed25e7f3d06db60d1c940e88f8ee2606b Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Tue, 3 Oct 2017 13:58:55 -0500 Subject: [PATCH 3/4] WIP: Insert conalwaysdeferred in the middle? (dump) --- src/bin/pg_dump/pg_dump.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 60fcc77..b4c5c35 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -6462,13 +6462,12 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables) "i.indkey, i.indisclustered, " "i.indisreplident, t.relpages, " "c.contype, c.conname, " - "c.condeferrable, c.condeferred, " + "c.condeferrable, c.condeferred, c.conalwaysdeferred, " "c.tableoid AS contableoid, " "c.oid AS conoid, " "pg_catalog.pg_get_constraintdef(c.oid, false) AS condef, " "(SELECT spcname FROM pg_catalog.pg_tablespace s WHERE s.oid = t.reltablespace) AS tablespace, " - "t.reloptions AS indreloptions, " - "c.conalwaysdeferred " + "t.reloptions AS indreloptions " "FROM pg_catalog.pg_index i " "JOIN pg_catalog.pg_class t ON (t.oid = i.indexrelid) " "LEFT JOIN pg_catalog.pg_constraint c " @@ -6494,13 +6493,12 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables) "i.indkey, i.indisclustered, " "false AS indisreplident, t.relpages, " "c.contype, c.conname, " - "c.condeferrable, c.condeferred, " + "c.condeferrable, c.condeferred, c.conalwaysdeferred, " "c.tableoid AS contableoid, " "c.oid AS conoid, " "pg_catalog.pg_get_constraintdef(c.oid, false) AS condef, " "(SELECT spcname FROM pg_catalog.pg_tablespace s WHERE s.oid = t.reltablespace) AS tablespace, " - "t.reloptions AS indreloptions, " - "c.conalwaysdeferred " + "t.reloptions AS indreloptions " "FROM pg_catalog.pg_index i " "JOIN pg_catalog.pg_class t ON (t.oid = i.indexrelid) " "LEFT JOIN pg_catalog.pg_constraint c " @@ -6522,13 +6520,12 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables) "i.indkey, i.indisclustered, " "false AS indisreplident, t.relpages, " "c.contype, c.conname, " - "c.condeferrable, c.condeferred, " + "c.condeferrable, c.condeferred, c.conalwaysdeferred " "c.tableoid AS contableoid, " "c.oid AS conoid, " "null AS condef, " "(SELECT spcname FROM pg_catalog.pg_tablespace s WHERE s.oid = t.reltablespace) AS tablespace, " - "t.reloptions AS indreloptions, " - "c.conalwaysdeferred " + "t.reloptions AS indreloptions " "FROM pg_catalog.pg_index i " "JOIN pg_catalog.pg_class t ON (t.oid = i.indexrelid) " "LEFT JOIN pg_catalog.pg_depend d " @@ -6553,13 +6550,12 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables) "i.indkey, i.indisclustered, " "false AS indisreplident, t.relpages, " "c.contype, c.conname, " - "c.condeferrable, c.condeferred, " + "c.condeferrable, c.condeferred, c.conalwaysdeferred " "c.tableoid AS contableoid, " "c.oid AS conoid, " "null AS condef, " "(SELECT spcname FROM pg_catalog.pg_tablespace s WHERE s.oid = t.reltablespace) AS tablespace, " - "null AS indreloptions, " - "c.conalwaysdeferred " + "null AS indreloptions " "FROM pg_catalog.pg_index i " "JOIN pg_catalog.pg_class t ON (t.oid = i.indexrelid) " "LEFT JOIN pg_catalog.pg_depend d " -- 2.7.4