aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2012-01-10 20:58:16 +0200
committerPeter Eisentraut <peter_e@gmx.net>2012-01-10 20:58:16 +0200
commit07123dff778389382f08d2152742bb061d351c21 (patch)
tree3e71727e24588bb97b330a1def2c9b731d840dc5 /src
parent89b3c6cc8b560f7f46a6a25b270aed5330c09a0e (diff)
downloadpostgresql-07123dff778389382f08d2152742bb061d351c21.tar.gz
postgresql-07123dff778389382f08d2152742bb061d351c21.zip
pg_dump: Dump foreign options in sorted order
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_dump/pg_dump.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index d1598ea4e98..13fc667b78a 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -5733,7 +5733,8 @@ getTableAttrs(TableInfo *tblinfo, int numTables)
"pg_catalog.array_to_string(ARRAY("
"SELECT pg_catalog.quote_ident(option_name) || "
"' ' || pg_catalog.quote_literal(option_value) "
- "FROM pg_catalog.pg_options_to_table(attfdwoptions)"
+ "FROM pg_catalog.pg_options_to_table(attfdwoptions) "
+ "ORDER BY option_name"
"), E',\n ') AS attfdwoptions "
"FROM pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_type t "
"ON a.atttypid = t.oid "
@@ -6564,7 +6565,8 @@ getForeignDataWrappers(int *numForeignDataWrappers)
"array_to_string(ARRAY("
"SELECT quote_ident(option_name) || ' ' || "
"quote_literal(option_value) "
- "FROM pg_options_to_table(fdwoptions)"
+ "FROM pg_options_to_table(fdwoptions) "
+ "ORDER BY option_name"
"), E',\n ') AS fdwoptions "
"FROM pg_foreign_data_wrapper",
username_subquery);
@@ -6578,7 +6580,8 @@ getForeignDataWrappers(int *numForeignDataWrappers)
"array_to_string(ARRAY("
"SELECT quote_ident(option_name) || ' ' || "
"quote_literal(option_value) "
- "FROM pg_options_to_table(fdwoptions)"
+ "FROM pg_options_to_table(fdwoptions) "
+ "ORDER BY option_name"
"), E',\n ') AS fdwoptions "
"FROM pg_foreign_data_wrapper",
username_subquery);
@@ -6667,7 +6670,8 @@ getForeignServers(int *numForeignServers)
"array_to_string(ARRAY("
"SELECT quote_ident(option_name) || ' ' || "
"quote_literal(option_value) "
- "FROM pg_options_to_table(srvoptions)"
+ "FROM pg_options_to_table(srvoptions) "
+ "ORDER BY option_name"
"), E',\n ') AS srvoptions "
"FROM pg_foreign_server",
username_subquery);
@@ -11777,7 +11781,8 @@ dumpUserMappings(Archive *fout,
"array_to_string(ARRAY("
"SELECT quote_ident(option_name) || ' ' || "
"quote_literal(option_value) "
- "FROM pg_options_to_table(umoptions)"
+ "FROM pg_options_to_table(umoptions) "
+ "ORDER BY option_name"
"), E',\n ') AS umoptions "
"FROM pg_user_mappings "
"WHERE srvid = '%u' "
@@ -12438,7 +12443,8 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo)
"pg_catalog.array_to_string(ARRAY("
"SELECT pg_catalog.quote_ident(option_name) || "
"' ' || pg_catalog.quote_literal(option_value) "
- "FROM pg_catalog.pg_options_to_table(ftoptions)"
+ "FROM pg_catalog.pg_options_to_table(ftoptions) "
+ "ORDER BY option_name"
"), E',\n ') AS ftoptions "
"FROM pg_catalog.pg_foreign_table ft "
"JOIN pg_catalog.pg_foreign_server fs "