@@ -1367,7 +1367,7 @@ describeOneTableDetails(const char *schemaname,
13671367 headers [cols ++ ] = gettext_noop ("Definition" );
13681368
13691369 if (tableinfo .relkind == 'f' && pset .sversion >= 90200 )
1370- headers [cols ++ ] = gettext_noop ("Options" );
1370+ headers [cols ++ ] = gettext_noop ("FDW Options" );
13711371
13721372 if (verbose )
13731373 {
@@ -2033,9 +2033,12 @@ describeOneTableDetails(const char *schemaname,
20332033 /* print foreign server name */
20342034 if (tableinfo .relkind == 'f' )
20352035 {
2036+ char * ftoptions ;
2037+
20362038 /* Footer information about foreign table */
20372039 printfPQExpBuffer (& buf ,
2038- "SELECT s.srvname\n"
2040+ "SELECT s.srvname,\n"
2041+ " f.ftoptions\n"
20392042 "FROM pg_catalog.pg_foreign_table f,\n"
20402043 " pg_catalog.pg_foreign_server s\n"
20412044 "WHERE f.ftrelid = %s AND s.oid = f.ftserver;" ,
@@ -2049,9 +2052,18 @@ describeOneTableDetails(const char *schemaname,
20492052 goto error_return ;
20502053 }
20512054
2055+ /* Print server name */
20522056 printfPQExpBuffer (& buf , "Server: %s" ,
20532057 PQgetvalue (result , 0 , 0 ));
20542058 printTableAddFooter (& cont , buf .data );
2059+
2060+ /* Print per-table FDW options, if any */
2061+ ftoptions = PQgetvalue (result , 0 , 1 );
2062+ if (ftoptions && ftoptions [0 ] != '\0' )
2063+ {
2064+ printfPQExpBuffer (& buf , "FDW Options: %s" , ftoptions );
2065+ printTableAddFooter (& cont , buf .data );
2066+ }
20552067 PQclear (result );
20562068 }
20572069
@@ -3668,7 +3680,7 @@ listForeignDataWrappers(const char *pattern, bool verbose)
36683680 printACLColumn (& buf , "fdwacl" );
36693681 appendPQExpBuffer (& buf ,
36703682 ",\n fdwoptions AS \"%s\"" ,
3671- gettext_noop ("Options" ));
3683+ gettext_noop ("FDW Options" ));
36723684
36733685 if (pset .sversion >= 90100 )
36743686 appendPQExpBuffer (& buf ,
@@ -3744,7 +3756,7 @@ listForeignServers(const char *pattern, bool verbose)
37443756 " d.description AS \"%s\"" ,
37453757 gettext_noop ("Type" ),
37463758 gettext_noop ("Version" ),
3747- gettext_noop ("Options" ),
3759+ gettext_noop ("FDW Options" ),
37483760 gettext_noop ("Description" ));
37493761 }
37503762
@@ -3807,7 +3819,7 @@ listUserMappings(const char *pattern, bool verbose)
38073819 if (verbose )
38083820 appendPQExpBuffer (& buf ,
38093821 ",\n um.umoptions AS \"%s\"" ,
3810- gettext_noop ("Options" ));
3822+ gettext_noop ("FDW Options" ));
38113823
38123824 appendPQExpBuffer (& buf , "\nFROM pg_catalog.pg_user_mappings um\n" );
38133825
@@ -3863,7 +3875,7 @@ listForeignTables(const char *pattern, bool verbose)
38633875 appendPQExpBuffer (& buf ,
38643876 ",\n ft.ftoptions AS \"%s\",\n"
38653877 " d.description AS \"%s\"" ,
3866- gettext_noop ("Options" ),
3878+ gettext_noop ("FDW Options" ),
38673879 gettext_noop ("Description" ));
38683880
38693881 appendPQExpBuffer (& buf ,
0 commit comments