pg_dump: Allow dumping default collation
authorPeter Eisentraut <[email protected]>
Tue, 13 Jun 2017 12:52:48 +0000 (08:52 -0400)
committerPeter Eisentraut <[email protected]>
Tue, 13 Jun 2017 12:52:48 +0000 (08:52 -0400)
This will not work on restore, but it will allow dumping out pg_catalog
for research and documentation.

Reported-by: Neil Anderson <[email protected]>
Bug: #14701

src/bin/pg_dump/pg_dump.c

index 0b1574d401ff6e9b49482ab175fbd97df4ba1403..1bec66ebbb60e7c8cbc9014b3809488594af4e05 100644 (file)
@@ -13073,6 +13073,9 @@ dumpCollation(Archive *fout, CollInfo *collinfo)
        appendPQExpBufferStr(q, "libc");
    else if (collprovider[0] == 'i')
        appendPQExpBufferStr(q, "icu");
+   else if (collprovider[0] == 'd')
+       /* to allow dumping pg_catalog; not accepted on input */
+       appendPQExpBufferStr(q, "default");
    else
        exit_horribly(NULL,
                      "unrecognized collation provider: %s\n",