CREATE PUBLICATION
是一个用于定义新的发布的 DDL 命令。
CREATE PUBLICATION
添加于PostgreSQL 10。
更改历史
- PostgreSQL 18
- 添加参数
publish_generated_columns
(提交 7054186c)
- 添加参数
- PostgreSQL 15
- PostgreSQL 13
- 添加参数
publish_via_partition_root
(提交 83fd4532)
- 添加参数
- PostgreSQL 10
- 添加(提交 665d1fad)
示例
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)
参考
- PostgreSQL 文档: CREATE PUBLICATION