final class AlterPublicationMembers
    implements Statement
    uses Snapshot
Public API: explicitly declared with @visibility public.

A request to add, replace or remove tables and schemas of a publication.

Rule: PG-PUBLICATION-002. Mirrors AlterPublicationStmt with an AlterPublicationAction and an object list (PG-PUBLICATION-LIST-001); removing a table with a row filter or column list is a diagnostic. Source: https://www.postgresql.org/docs/17/sql-alterpublication.html. Status: Implemented.

Removing a table with a row filterdoctest
(new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ALTER PUBLICATION p DROP TABLE t WHERE (true)') // throws \SqlSemantics\Platform\PostgreSql\Model\Diagnostic\SemanticException: cannot use a WHERE clause when removing a table from a publication

Properties§

public non-empty-list<PublicationMember> $objects
public Name $name

Methods§

public function __construct(
    public Name $name,
    public PublicationAction $action,
    list<PublicationMember> $objects,
)

Parameters

$nameNameThe publication name
$actionPublicationActionWhether the objects are added, replace the list, or are removed
$objectslist<PublicationMember>The tables and schemas in the order written; at least one
Calls 4
public function deriveStatement(Derivation $derivation): void

Derives the tables and checks the list.

Parameters

$derivationDerivation
Calls 2
public function render(Output $out): void

Writes the request.

Parameters

$outOutput
Calls 2

Test cases 1§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1

Relations§

Instantiated in 3