云数据库 GaussDB-CREATE PUBLICATION:示例

时间:2023-11-01 16:22:10

示例

--创建一个发布,发布两个表中所有更改。CREATE PUBLICATION mypublication FOR TABLE users, departments;--创建一个发布,发布所有表中的所有更改。CREATE PUBLICATION alltables FOR ALL TABLES;--创建一个发布,只发布一个表中的INSERT操作。CREATE PUBLICATION insert_only FOR TABLE mydata WITH (publish = 'insert');--修改发布的动作。ALTER PUBLICATION insert_only SET (publish='insert,update,delete');--向发布中添加表。ALTER PUBLICAITON insert_only ADD TABLE mydata2;--删除发布。DROP PUBLICATION insert_only;
support.huaweicloud.com/centralized-devg-v2-opengauss/devg_03_0562.html