# phpman > man > ALTER_PUBLICATION(7)

ALTER [PUBLICATION(7)](https://www.chedong.com/phpMan.php/man/PUBLICATION/7/markdown)               PostgreSQL 14.23 Documentation               ALTER [PUBLICATION(7)](https://www.chedong.com/phpMan.php/man/PUBLICATION/7/markdown)



## NAME
       ALTER_PUBLICATION - change the definition of a publication

## SYNOPSIS
       ALTER PUBLICATION _name_ ADD TABLE [ ONLY ] _table_name_ [ * ] [, ...]
       ALTER PUBLICATION _name_ SET TABLE [ ONLY ] _table_name_ [ * ] [, ...]
       ALTER PUBLICATION _name_ DROP TABLE [ ONLY ] _table_name_ [ * ] [, ...]
       ALTER PUBLICATION _name_ SET ( _publication_parameter_ [= _value_] [, ... ] )
       ALTER PUBLICATION _name_ OWNER TO { _new_owner_ | CURRENT_ROLE | CURRENT_USER | SESSION_USER }
       ALTER PUBLICATION _name_ RENAME TO _new_name_

## DESCRIPTION
       The command **ALTER** **PUBLICATION** can change the attributes of a publication.

       The first three variants change which tables are part of the publication. The SET TABLE
       clause will replace the list of tables in the publication with the specified one. The ADD
       TABLE and DROP TABLE clauses will add and remove one or more tables from the publication.
       Note that adding tables to a publication that is already subscribed to will require a ALTER
       SUBSCRIPTION ... REFRESH PUBLICATION action on the subscribing side in order to become
       effective.

       The fourth variant of this command listed in the synopsis can change all of the publication
       properties specified in CREATE PUBLICATION (**CREATE**___**[PUBLICATION**(7)](https://www.chedong.com/phpMan.php/man/PUBLICATION/7/markdown)). Properties not mentioned
       in the command retain their previous settings.

       The remaining variants change the owner and the name of the publication.

       You must own the publication to use **ALTER** **PUBLICATION**. Adding a table to a publication
       additionally requires owning that table. To alter the owner, you must also be a direct or
       indirect member of the new owning role. The new owner must have CREATE privilege on the
       database. Also, the new owner of a FOR ALL TABLES publication must be a superuser. However, a
       superuser can change the ownership of a publication regardless of these restrictions.

## PARAMETERS
       _name_
           The name of an existing publication whose definition is to be altered.

       _table_name_
           Name of an existing table. If ONLY is specified before the table name, only that table is
           affected. If ONLY is not specified, the table and all its descendant tables (if any) are
           affected. Optionally, * can be specified after the table name to explicitly indicate that
           descendant tables are included.

       SET ( _publication_parameter_ [= _value_] [, ... ] )
           This clause alters publication parameters originally set by CREATE PUBLICATION
           (**CREATE**___**[PUBLICATION**(7)](https://www.chedong.com/phpMan.php/man/PUBLICATION/7/markdown)). See there for more information.

       _new_owner_
           The user name of the new owner of the publication.

       _new_name_
           The new name for the 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, departments;

## COMPATIBILITY
       **ALTER** **PUBLICATION** is a PostgreSQL extension.

## SEE ALSO
       CREATE PUBLICATION (**CREATE**___**[PUBLICATION**(7)](https://www.chedong.com/phpMan.php/man/PUBLICATION/7/markdown)), DROP PUBLICATION (**DROP**___**[PUBLICATION**(7)](https://www.chedong.com/phpMan.php/man/PUBLICATION/7/markdown)), CREATE
       SUBSCRIPTION (**CREATE**___**[SUBSCRIPTION**(7)](https://www.chedong.com/phpMan.php/man/SUBSCRIPTION/7/markdown)), ALTER SUBSCRIPTION (**ALTER**___**[SUBSCRIPTION**(7)](https://www.chedong.com/phpMan.php/man/SUBSCRIPTION/7/markdown))



PostgreSQL 14.23                                2026                            ALTER [PUBLICATION(7)](https://www.chedong.com/phpMan.php/man/PUBLICATION/7/markdown)
