RefLib

Reference library for AI

Back

postgresql_16:7.1.23.3 Examples

PostgreSQL 16 > Reference > SQL Commands > ALTER PUBLICATION > Examples

Change the publication to publish only deletes and updates: ALTER PUBLICATION noinsert SET (publish = 'update, delete');

Add some tables to the publication: ALTER PUBLICATION mypublication ADD TABLE users (user_id, firstname), departments;

Change the set of columns published for a table: ALTER PUBLICATION mypublication SET TABLE users (user_id, firstname, lastname), TABLE departments;

Add schemas marketing and sales to the publication sales_publication: ALTER PUBLICATION sales_publication ADD TABLES IN SCHEMA marketing, sales;

Add tables users, departments and schema production to the publication production_publication: ALTER PUBLICATION production_publication ADD TABLE users, departments, TABLES IN SCHEMA production;

Back