ALTER PUBLICATION
Function
ALTER PUBLICATION alters the attributes of a publication.
Precautions
Only the owner of a publication and the system administrator can execute ALTER PUBLICATION. Only the direct or indirect members of the new owner role can change the owner. The new owner must have the CREATE permission on the current database. In addition, the new owner published by FOR ALL TABLES must be the system administrator. However, the system administrator can change the ownership of a publication while avoiding these restrictions.
Syntax
Replace the currently published table with a specified table.
ALTER PUBLICATION name SET TABLE table_name [, ...]
Add one or more tables to a publication.
ALTER PUBLICATION name ADD TABLE table_name [, ...]
Delete one or more tables from a publication.
ALTER PUBLICATION name DROP TABLE table_name [, ...]
Change all publication attributes specified in CREATE PUBLICATION. Retain previous settings for attributes that are not mentioned.
ALTER PUBLICATION name SET ( publication_parameter [= value] [, ... ] )
Change the owner of a publication.
ALTER PUBLICATION name OWNER TO { new_owner | CURRENT_USER | SESSION_USER }
Change the name of a publication.
ALTER PUBLICATION name RENAME TO new_name
Parameter Description
name
Specifies the name of the publication to be modified.
table_name
Specifies the name of an existing table.
SET ( publication_parameter [= value] [, … ] )
Modifies the publication parameters initially set by CREATE PUBLICATION.
new_owner
Specifies the username of the new owner of a publication.
new_name
Specifies the new name of a publication.
Examples
For details, see Examples.