Updated on 2025-07-22 GMT+08:00

_PG_FOREIGN_TABLES

_PG_FOREIGN_TABLES stores information about all foreign tables defined in the current database, but it only displays the tables that the current user has access to. Only users with the SYSADMIN permission can query this view.

Table 1 _PG_FOREIGN_TABLES columns

Name

Type

Description

foreign_table_catalog

information_schema.sql_identifier

Name of the database where the foreign table is located (always the current database)

foreign_table_schema

name

Name of the schema that the foreign table is in

foreign_table_name

name

Name of the foreign table

ftoptions

text[]

Foreign table options

foreign_server_catalog

information_schema.sql_identifier

Name of the database where the foreign server is located (always the current database)

foreign_server_name

information_schema.sql_identifier

Name of the foreign server

authorization_identifier

information_schema.sql_identifier

Role of the owner