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

PG_FOREIGN_DATA_WRAPPER

PG_FOREIGN_DATA_WRAPPER stores foreign-data wrapper definitions. A foreign-data wrapper is the mechanism by which foreign data resides on foreign servers and is accessible.

Table 1 PG_FOREIGN_DATA_WRAPPER columns

Column

Type

Reference

Description

oid

oid

-

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

fdwname

name

-

Name of a foreign-data wrapper.

fdwowner

oid

PG_AUTHID.oid

Owner of the foreign-data wrapper.

fdwhandler

oid

PG_PROC.oid

References a handler function that provides extended routines for the foreign-data wrapper. The value is 0 if no handler function is provided.

fdwvalidator

oid

PG_PROC.oid

References a validator function responsible for validating the options given to the foreign-data wrapper, the foreign-server options, and the user mappings using the foreign-data wrapper. The value is 0 if no validator function is provided.

fdwacl

aclitem[]

-

Access permissions.

fdwoptions

text[]

-

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