@@ -1367,7 +1367,7 @@ describeOneTableDetails(const char *schemaname,
1367
1367
headers [cols ++ ] = gettext_noop ("Definition" );
1368
1368
1369
1369
if (tableinfo .relkind == 'f' && pset .sversion >= 90200 )
1370
- headers [cols ++ ] = gettext_noop ("Options" );
1370
+ headers [cols ++ ] = gettext_noop ("FDW Options" );
1371
1371
1372
1372
if (verbose )
1373
1373
{
@@ -2033,9 +2033,12 @@ describeOneTableDetails(const char *schemaname,
2033
2033
/* print foreign server name */
2034
2034
if (tableinfo .relkind == 'f' )
2035
2035
{
2036
+ char * ftoptions ;
2037
+
2036
2038
/* Footer information about foreign table */
2037
2039
printfPQExpBuffer (& buf ,
2038
- "SELECT s.srvname\n"
2040
+ "SELECT s.srvname,\n"
2041
+ " f.ftoptions\n"
2039
2042
"FROM pg_catalog.pg_foreign_table f,\n"
2040
2043
" pg_catalog.pg_foreign_server s\n"
2041
2044
"WHERE f.ftrelid = %s AND s.oid = f.ftserver;" ,
@@ -2049,9 +2052,18 @@ describeOneTableDetails(const char *schemaname,
2049
2052
goto error_return ;
2050
2053
}
2051
2054
2055
+ /* Print server name */
2052
2056
printfPQExpBuffer (& buf , "Server: %s" ,
2053
2057
PQgetvalue (result , 0 , 0 ));
2054
2058
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
+ }
2055
2067
PQclear (result );
2056
2068
}
2057
2069
@@ -3668,7 +3680,7 @@ listForeignDataWrappers(const char *pattern, bool verbose)
3668
3680
printACLColumn (& buf , "fdwacl" );
3669
3681
appendPQExpBuffer (& buf ,
3670
3682
",\n fdwoptions AS \"%s\"" ,
3671
- gettext_noop ("Options" ));
3683
+ gettext_noop ("FDW Options" ));
3672
3684
3673
3685
if (pset .sversion >= 90100 )
3674
3686
appendPQExpBuffer (& buf ,
@@ -3744,7 +3756,7 @@ listForeignServers(const char *pattern, bool verbose)
3744
3756
" d.description AS \"%s\"" ,
3745
3757
gettext_noop ("Type" ),
3746
3758
gettext_noop ("Version" ),
3747
- gettext_noop ("Options" ),
3759
+ gettext_noop ("FDW Options" ),
3748
3760
gettext_noop ("Description" ));
3749
3761
}
3750
3762
@@ -3807,7 +3819,7 @@ listUserMappings(const char *pattern, bool verbose)
3807
3819
if (verbose )
3808
3820
appendPQExpBuffer (& buf ,
3809
3821
",\n um.umoptions AS \"%s\"" ,
3810
- gettext_noop ("Options" ));
3822
+ gettext_noop ("FDW Options" ));
3811
3823
3812
3824
appendPQExpBuffer (& buf , "\nFROM pg_catalog.pg_user_mappings um\n" );
3813
3825
@@ -3863,7 +3875,7 @@ listForeignTables(const char *pattern, bool verbose)
3863
3875
appendPQExpBuffer (& buf ,
3864
3876
",\n ft.ftoptions AS \"%s\",\n"
3865
3877
" d.description AS \"%s\"" ,
3866
- gettext_noop ("Options" ),
3878
+ gettext_noop ("FDW Options" ),
3867
3879
gettext_noop ("Description" ));
3868
3880
3869
3881
appendPQExpBuffer (& buf ,
0 commit comments