pg_publication_tables
A system view listing the mapping between publications and their tables
pg_publication_tables
is a system catalogue view listing the mapping between publications and the tables they contain.
pg_publication_tables
was added in PostgreSQL 10.
Definition by PostgreSQL version
pg_publication_tables (PostgreSQL 16)
View "pg_catalog.pg_publication_tables" Column | Type | Collation | Nullable | Default ------------+--------+-----------+----------+--------- pubname | name | | | schemaname | name | | | tablename | name | | | attnames | name[] | | | rowfilter | text | | |
Documentation: pg_publication_tables
pg_publication_tables (PostgreSQL 15)
View "pg_catalog.pg_publication_tables" Column | Type | Collation | Nullable | Default ------------+--------+-----------+----------+--------- pubname | name | | | schemaname | name | | | tablename | name | | | attnames | name[] | | | rowfilter | text | | |
Documentation: pg_publication_tables
pg_publication_tables (PostgreSQL 14)
View "pg_catalog.pg_publication_tables" Column | Type | Collation | Nullable | Default ------------+------+-----------+----------+--------- pubname | name | | | schemaname | name | | | tablename | name | | |
Documentation: pg_publication_tables
pg_publication_tables (PostgreSQL 13)
View "pg_catalog.pg_publication_tables" Column | Type | Collation | Nullable | Default ------------+------+-----------+----------+--------- pubname | name | | | schemaname | name | | | tablename | name | | |
Documentation: pg_publication_tables
pg_publication_tables (PostgreSQL 12)
View "pg_catalog.pg_publication_tables" Column | Type | Collation | Nullable | Default ------------+------+-----------+----------+--------- pubname | name | | | schemaname | name | | | tablename | name | | |
Documentation: pg_publication_tables
pg_publication_tables (PostgreSQL 11)
View "pg_catalog.pg_publication_tables" Column | Type | Collation | Nullable | Default ------------+------+-----------+----------+--------- pubname | name | | | schemaname | name | | | tablename | name | | |
Documentation: pg_publication_tables
pg_publication_tables (PostgreSQL 10)
View "pg_catalog.pg_publication_tables" Column | Type | Collation | Nullable | Default ------------+------+-----------+----------+--------- pubname | name | | | schemaname | name | | | tablename | name | | |
Documentation: pg_publication_tables
Change history
This view has remained unchanged since its introduction in PostgreSQL 10.
- PostgreSQL 10
- added (commit 665d1fad)
Examples
Example usage for pg_publication_tables
:
postgres=# \dt List of relations Schema | Name | Type | Owner --------+------+-------+---------- public | bar | table | postgres public | foo | table | postgres (2 rows) postgres=# CREATE PUBLICATION foo_publication FOR TABLE foo; CREATE PUBLICATION postgres=# CREATE PUBLICATION all_publication FOR ALL TABLES; CREATE PUBLICATION postgres=# SELECT * FROM pg_publication_tables; pubname | schemaname | tablename -----------------+------------+----------- foo_publication | public | foo all_publication | public | foo all_publication | public | bar (3 rows)
References
- PostgreSQL documentation: pg_publication_tables