Contents
CREATE PUBLICATION
An SQL command for defining a new publication
CREATE PUBLICATION
is a DDL command for defining a new publication.
CREATE PUBLICATION
was added in PostgreSQL 10.
Change history
- PostgreSQL 15
- PostgreSQL 13
- parameter
publish_via_partition_root
added (commit 83fd4532)
- parameter
- PostgreSQL 10
- added (commit 665d1fad)
Examples
Basic usage example for CREATE PUBLICATION
:
postgres=# CREATE PUBLICATION misc_publication FOR TABLE foo; CREATE PUBLICATION postgres=# \dRp List of publications Name | Owner | All tables | Inserts | Updates | Deletes | Truncates | Via root ------------------+----------+------------+---------+---------+---------+-----------+---------- misc_publication | postgres | f | t | t | t | t | f (1 row)
References
- PostgreSQL documentation: CREATE PUBLICATION