Updated on 2025-08-25 GMT+08:00

PG_FOREIGN_SERVER

PG_FOREIGN_SERVER stores foreign server definitions. A foreign server describes an external data source, such as a remote server. Foreign servers are accessed through foreign-data wrappers.

Table 1 PG_FOREIGN_SERVER columns

Column

Type

Reference

Description

oid

oid

-

Row identifier (a hidden attribute that is only shown upon explicit selection).

srvname

name

-

Name of the foreign server.

srvowner

oid

PG_AUTHID.oid

Owner of the foreign server.

srvfdw

oid

PG_FOREIGN_DATA_WRAPPER.oid

OID of the foreign-data wrapper of this foreign server.

srvtype

text

-

Server type (optional).

srvversion

text

-

Server version (optional).

srvacl

aclitem[]

-

Access permissions.

srvoptions

text[]

-

Foreign server-specific options, using strings in the keyword=value format.