mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
pg_dump: Dump foreign options in sorted order
This commit is contained in:
@ -5734,6 +5734,7 @@ getTableAttrs(TableInfo *tblinfo, int numTables)
|
||||
"SELECT pg_catalog.quote_ident(option_name) || "
|
||||
"' ' || pg_catalog.quote_literal(option_value) "
|
||||
"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 "
|
||||
@ -6565,6 +6566,7 @@ getForeignDataWrappers(int *numForeignDataWrappers)
|
||||
"SELECT quote_ident(option_name) || ' ' || "
|
||||
"quote_literal(option_value) "
|
||||
"FROM pg_options_to_table(fdwoptions) "
|
||||
"ORDER BY option_name"
|
||||
"), E',\n ') AS fdwoptions "
|
||||
"FROM pg_foreign_data_wrapper",
|
||||
username_subquery);
|
||||
@ -6579,6 +6581,7 @@ getForeignDataWrappers(int *numForeignDataWrappers)
|
||||
"SELECT quote_ident(option_name) || ' ' || "
|
||||
"quote_literal(option_value) "
|
||||
"FROM pg_options_to_table(fdwoptions) "
|
||||
"ORDER BY option_name"
|
||||
"), E',\n ') AS fdwoptions "
|
||||
"FROM pg_foreign_data_wrapper",
|
||||
username_subquery);
|
||||
@ -6668,6 +6671,7 @@ getForeignServers(int *numForeignServers)
|
||||
"SELECT quote_ident(option_name) || ' ' || "
|
||||
"quote_literal(option_value) "
|
||||
"FROM pg_options_to_table(srvoptions) "
|
||||
"ORDER BY option_name"
|
||||
"), E',\n ') AS srvoptions "
|
||||
"FROM pg_foreign_server",
|
||||
username_subquery);
|
||||
@ -11778,6 +11782,7 @@ dumpUserMappings(Archive *fout,
|
||||
"SELECT quote_ident(option_name) || ' ' || "
|
||||
"quote_literal(option_value) "
|
||||
"FROM pg_options_to_table(umoptions) "
|
||||
"ORDER BY option_name"
|
||||
"), E',\n ') AS umoptions "
|
||||
"FROM pg_user_mappings "
|
||||
"WHERE srvid = '%u' "
|
||||
@ -12439,6 +12444,7 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo)
|
||||
"SELECT pg_catalog.quote_ident(option_name) || "
|
||||
"' ' || pg_catalog.quote_literal(option_value) "
|
||||
"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 "
|
||||
|
Reference in New Issue
Block a user