Fork Me On GitLab

psql Tips

Psql Tip #084

\des will display a list of user create and visible foreign servers. \des pattern will list foreign servers matching the pattern. The + modifier will also display access privileges, type, version, FDW option and description.
laetitia=# \des
         List of foreign servers
 Name  |  Owner   | Foreign-data wrapper 
-------+----------+----------------------
 pglog | laetitia | file_fdw
(1 row)

laetitia=# \des+
                                         List of foreign servers
 Name  |  Owner   | Foreign-data wrapper | Access privileges | Type | Version | FDW options | Description 
-------+----------+----------------------+-------------------+------+---------+-------------+-------------
 pglog | laetitia | file_fdw             |                   |      |         |             | 
(1 row)
This feature is available since Postgres 8.4.
See Postgres documentation for more information.
Try a new tipSee them all