@@ -5733,7 +5733,8 @@ getTableAttrs(TableInfo *tblinfo, int numTables)
57335733"pg_catalog.array_to_string(ARRAY("
57345734"SELECT pg_catalog.quote_ident(option_name) || "
57355735"' ' || pg_catalog.quote_literal(option_value) "
5736- "FROM pg_catalog.pg_options_to_table(attfdwoptions)"
5736+ "FROM pg_catalog.pg_options_to_table(attfdwoptions) "
5737+ "ORDER BY option_name"
57375738"), E',\n ') AS attfdwoptions "
57385739"FROM pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_type t "
57395740"ON a.atttypid = t.oid "
@@ -6564,7 +6565,8 @@ getForeignDataWrappers(int *numForeignDataWrappers)
65646565"array_to_string(ARRAY("
65656566"SELECT quote_ident(option_name) || ' ' || "
65666567"quote_literal(option_value) "
6567- "FROM pg_options_to_table(fdwoptions)"
6568+ "FROM pg_options_to_table(fdwoptions) "
6569+ "ORDER BY option_name"
65686570"), E',\n ') AS fdwoptions "
65696571"FROM pg_foreign_data_wrapper" ,
65706572username_subquery );
@@ -6578,7 +6580,8 @@ getForeignDataWrappers(int *numForeignDataWrappers)
65786580"array_to_string(ARRAY("
65796581"SELECT quote_ident(option_name) || ' ' || "
65806582"quote_literal(option_value) "
6581- "FROM pg_options_to_table(fdwoptions)"
6583+ "FROM pg_options_to_table(fdwoptions) "
6584+ "ORDER BY option_name"
65826585"), E',\n ') AS fdwoptions "
65836586"FROM pg_foreign_data_wrapper" ,
65846587username_subquery );
@@ -6667,7 +6670,8 @@ getForeignServers(int *numForeignServers)
66676670"array_to_string(ARRAY("
66686671"SELECT quote_ident(option_name) || ' ' || "
66696672"quote_literal(option_value) "
6670- "FROM pg_options_to_table(srvoptions)"
6673+ "FROM pg_options_to_table(srvoptions) "
6674+ "ORDER BY option_name"
66716675"), E',\n ') AS srvoptions "
66726676"FROM pg_foreign_server" ,
66736677username_subquery );
@@ -11777,7 +11781,8 @@ dumpUserMappings(Archive *fout,
1177711781"array_to_string(ARRAY("
1177811782"SELECT quote_ident(option_name) || ' ' || "
1177911783"quote_literal(option_value) "
11780- "FROM pg_options_to_table(umoptions)"
11784+ "FROM pg_options_to_table(umoptions) "
11785+ "ORDER BY option_name"
1178111786"), E',\n ') AS umoptions "
1178211787"FROM pg_user_mappings "
1178311788"WHERE srvid = '%u' "
@@ -12438,7 +12443,8 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo)
1243812443"pg_catalog.array_to_string(ARRAY("
1243912444"SELECT pg_catalog.quote_ident(option_name) || "
1244012445"' ' || pg_catalog.quote_literal(option_value) "
12441- "FROM pg_catalog.pg_options_to_table(ftoptions)"
12446+ "FROM pg_catalog.pg_options_to_table(ftoptions) "
12447+ "ORDER BY option_name"
1244212448"), E',\n ') AS ftoptions "
1244312449"FROM pg_catalog.pg_foreign_table ft "
1244412450"JOIN pg_catalog.pg_foreign_server fs "