HomeMogDBMogDB StackUqbar
v3.1

Documentation:v3.1

Supported Versions:

Other Versions:

ALTER PUBLICATION

Function

ALTER PUBLICATION changes the attributes of the PUBLICATION.

Precautions

Only the published owner and the system administrator can perform ALTER PUBLICATION. Direct or indirect members of the new owner role can change the owner. The new owner must have CREATE permission on the current database. In addition, the new owner of a FOR ALL TABLES publication must be a system administrator. However, the system administrator can change the ownership of a publication while circumventing these restrictions.

Syntax

  • Replace the currently published table with the specified table.

    AlterPublication ::= ALTER PUBLICATION name SET TABLE table_name [, ...]
  • Add one or more tables from the publication.

    AlterPublication ::= ALTER PUBLICATION name ADD TABLE table_name [, ...]
  • Drop one or more tables from the publication.

    AlterPublication ::= ALTER PUBLICATION name DROP TABLE table_name [, ...]
  • Change all publication attributes specified in CREATE PUBLICATION, and leave unmentioned attributes with their previous settings.

    AlterPublication ::= ALTER PUBLICATION name SET ( { publication_parameter [= value] } [, ... ] )
  • Change the owner of the publication.

    AlterPublication ::= ALTER PUBLICATION name OWNER TO { new_owner | CURRENT_USER | SESSION_USER }
  • Change the name of the publication.

    AlterPublication ::= ALTER PUBLICATION name RENAME TO new_name

Parameter Description

  • name

The name of the publication to be modified.

  • table_name

The name of the existing table.

  • SET ( publication_parameter [= value] [, ...] )

This clause modifies the publication parameters originally set by CREATE PUBLICATION.

  • new_owner

The username of the new owner of the publication.

  • new_name

The new name of the publication.

Examples

See examples in CREATE PUBLICATION.

CREATE PUBLICATION, DROP PUBLICATION

Copyright © 2011-2024 www.enmotech.com All rights reserved.