pg_foreign_server — PostgreSQL system catalog

The PostgreSQL pg_foreign_server system catalog: full column reference (names, types, descriptions), catalog relationships and version support.

Summary

The catalog pg_foreign_server stores foreign server definitions. A foreign server describes a source of external data, such as a remote server. Foreign servers are accessed via foreign-data wrappers.

(Description quoted from the official PostgreSQL documentation.)

Columns

The pg_foreign_server system catalog exposes the following columns (names, types and descriptions are taken verbatim from the PostgreSQL documentation):

  • oid oid
    Row identifier
  • srvname name
    Name of the foreign server
  • srvowner oid references pg_authid.oid
    Owner of the foreign server
  • srvfdw oid references pg_foreign_data_wrapper.oid
    OID of the foreign-data wrapper of this foreign server
  • srvtype text
    Type of the server (optional)
  • srvversion text
    Version of the server (optional)
  • srvacl aclitem[]
    Access privileges; see ddl_priv for details
  • srvoptions text[]
    Foreign server specific options, as “keyword=value” strings

Related catalogs

This object references the following other system catalogs:

Version applicability

Present in PostgreSQL 17, 18, 19 (verified against each release’s documentation). This is a long-standing system object that also exists in earlier PostgreSQL releases.

Related & references

Reference: PostgreSQL documentation — pg_foreign_server.