]> granicus.if.org Git - postgresql/commitdiff
Fix cross-version pg_dump for aggregate combine functions.
authorRobert Haas <rhaas@postgresql.org>
Thu, 28 Jan 2016 02:45:07 +0000 (21:45 -0500)
committerRobert Haas <rhaas@postgresql.org>
Thu, 28 Jan 2016 02:45:07 +0000 (21:45 -0500)
Fixes a defect in commit a7de3dc5c346e07e0439275982569996e645b3c2.

David Rowley, per report from Jeff Janes, who also checked that the
fix works.

src/bin/pg_dump/pg_dump.c

index de1ece17c0c5766831bd487d228d215100a0600f..aa01d6a66c7d9be557bb1f67d3c9d1820e8f235d 100644 (file)
@@ -12454,8 +12454,8 @@ dumpAgg(Archive *fout, AggInfo *agginfo)
        {
                appendPQExpBuffer(query, "SELECT aggtransfn, "
                                                  "aggfinalfn, aggtranstype::pg_catalog.regtype, "
-                                                 "aggmtransfn, aggminvtransfn, aggmfinalfn, "
-                                                 "aggmtranstype::pg_catalog.regtype, "
+                                                 "'-' AS aggcombinefn, aggmtransfn, aggminvtransfn, "
+                                                 "aggmfinalfn, aggmtranstype::pg_catalog.regtype, "
                                                  "aggfinalextra, aggmfinalextra, "
                                                  "aggsortop::pg_catalog.regoperator, "
                                                  "(aggkind = 'h') AS hypothetical, "
@@ -12473,9 +12473,10 @@ dumpAgg(Archive *fout, AggInfo *agginfo)
        {
                appendPQExpBuffer(query, "SELECT aggtransfn, "
                                                  "aggfinalfn, aggtranstype::pg_catalog.regtype, "
-                                                 "'-' AS aggmtransfn, '-' AS aggminvtransfn, "
-                                                 "'-' AS aggmfinalfn, 0 AS aggmtranstype, "
-                                                 "false AS aggfinalextra, false AS aggmfinalextra, "
+                                                 "'-' AS aggcombinefn, '-' AS aggmtransfn, "
+                                                 "'-' AS aggminvtransfn, '-' AS aggmfinalfn, "
+                                                 "0 AS aggmtranstype, false AS aggfinalextra, "
+                                                 "false AS aggmfinalextra, "
                                                  "aggsortop::pg_catalog.regoperator, "
                                                  "false AS hypothetical, "
                                                  "0 AS aggtransspace, agginitval, "
@@ -12492,9 +12493,10 @@ dumpAgg(Archive *fout, AggInfo *agginfo)
        {
                appendPQExpBuffer(query, "SELECT aggtransfn, "
                                                  "aggfinalfn, aggtranstype::pg_catalog.regtype, "
-                                                 "'-' AS aggmtransfn, '-' AS aggminvtransfn, "
-                                                 "'-' AS aggmfinalfn, 0 AS aggmtranstype, "
-                                                 "false AS aggfinalextra, false AS aggmfinalextra, "
+                                                 "'-' AS aggcombinefn, '-' AS aggmtransfn, "
+                                                 "'-' AS aggminvtransfn, '-' AS aggmfinalfn, "
+                                                 "0 AS aggmtranstype, false AS aggfinalextra, "
+                                                 "false AS aggmfinalextra, "
                                                  "aggsortop::pg_catalog.regoperator, "
                                                  "false AS hypothetical, "
                                                  "0 AS aggtransspace, agginitval, "
@@ -12509,10 +12511,10 @@ dumpAgg(Archive *fout, AggInfo *agginfo)
        {
                appendPQExpBuffer(query, "SELECT aggtransfn, "
                                                  "aggfinalfn, aggtranstype::pg_catalog.regtype, "
-                                                 "'-' AS aggmtransfn, '-' AS aggminvtransfn, "
-                                                 "'-' AS aggmfinalfn, 0 AS aggmtranstype, "
-                                                 "false AS aggfinalextra, false AS aggmfinalextra, "
-                                                 "0 AS aggsortop, "
+                                                 "'-' AS aggcombinefn, '-' AS aggmtransfn, "
+                                                 "'-' AS aggminvtransfn, '-' AS aggmfinalfn, "
+                                                 "0 AS aggmtranstype, false AS aggfinalextra, "
+                                                 "false AS aggmfinalextra, 0 AS aggsortop, "
                                                  "false AS hypothetical, "
                                                  "0 AS aggtransspace, agginitval, "
                                                  "0 AS aggmtransspace, NULL AS aggminitval, "
@@ -12526,10 +12528,10 @@ dumpAgg(Archive *fout, AggInfo *agginfo)
        {
                appendPQExpBuffer(query, "SELECT aggtransfn, aggfinalfn, "
                                                  "format_type(aggtranstype, NULL) AS aggtranstype, "
-                                                 "'-' AS aggmtransfn, '-' AS aggminvtransfn, "
-                                                 "'-' AS aggmfinalfn, 0 AS aggmtranstype, "
-                                                 "false AS aggfinalextra, false AS aggmfinalextra, "
-                                                 "0 AS aggsortop, "
+                                                 "'-' AS aggcombinefn, '-' AS aggmtransfn, "
+                                                 "'-' AS aggminvtransfn, '-' AS aggmfinalfn, "
+                                                 "0 AS aggmtranstype, false AS aggfinalextra, "
+                                                 "false AS aggmfinalextra, 0 AS aggsortop, "
                                                  "false AS hypothetical, "
                                                  "0 AS aggtransspace, agginitval, "
                                                  "0 AS aggmtransspace, NULL AS aggminitval, "
@@ -12543,10 +12545,10 @@ dumpAgg(Archive *fout, AggInfo *agginfo)
                appendPQExpBuffer(query, "SELECT aggtransfn1 AS aggtransfn, "
                                                  "aggfinalfn, "
                                                  "(SELECT typname FROM pg_type WHERE oid = aggtranstype1) AS aggtranstype, "
-                                                 "'-' AS aggmtransfn, '-' AS aggminvtransfn, "
-                                                 "'-' AS aggmfinalfn, 0 AS aggmtranstype, "
-                                                 "false AS aggfinalextra, false AS aggmfinalextra, "
-                                                 "0 AS aggsortop, "
+                                                 "'-' AS aggcombinefn, '-' AS aggmtransfn, "
+                                                 "'-' AS aggminvtransfn, '-' AS aggmfinalfn, "
+                                                 "0 AS aggmtranstype, false AS aggfinalextra, "
+                                                 "false AS aggmfinalextra, 0 AS aggsortop, "
                                                  "false AS hypothetical, "
                                                  "0 AS aggtransspace, agginitval1 AS agginitval, "
                                                  "0 AS aggmtransspace, NULL AS aggminitval, "