Summary
The view pg_publication_tables provides information about the mapping between publications and information of tables they contain. Unlike the underlying catalog pg_publication_rel, this view expands publications defined as FOR ALL TABLES and FOR TABLES IN SCHEMA, so for such publications there will be a row for each eligible table.
(Description quoted from the official PostgreSQL documentation.)
Columns
The pg_publication_tables system view exposes the following columns (names, types and descriptions are taken verbatim from the PostgreSQL documentation):
pubnamenamereferencespg_publication.pubname
Name of publicationschemanamenamereferencespg_namespace.nspname
Name of schema containing tabletablenamenamereferencespg_class.relname
Name of tableattnamesname[]referencespg_attribute.attname
Names of table columns included in the publication. This contains all the columns of the table when the user didn’t specify the column list for the table.rowfiltertext
Expression for the table’s publication qualifying condition
Related catalogs
This object references the following other system catalogs:
pubname→pg_publicationschemaname→pg_namespacetablename→pg_classattnames→pg_attribute
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_publication_tables.