final class ReplicaIdentity
    implements AlterCommand
    uses Snapshot
Public API: explicitly declared with @visibility public.

REPLICA IDENTITY: what identifies a row in logical replication.

Mirrors ReplicaIdentityStmt; an index is named only for USING INDEX. Source: https://www.postgresql.org/docs/17/sql-altertable.html.

Using an index as replica identitydoctest
$statement = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ALTER TABLE t REPLICA IDENTITY USING INDEX k');
    $statement->statement->commands[0]->index->value // => 'k'

Properties§

public Name|null $index = null

Methods§

public function __construct(public ReplicaIdentityKind $kind, public Name|null $index = null)

Parameters

$kindReplicaIdentityKindThe identity
$indexName|nullThe index for USING INDEX
Calls 2
public function deriveClause(Derivation $derivation, Environment $environment): void

Derives nothing: the index is a catalog name.

Parameters

$derivationDerivation
$environmentEnvironment
public function render(Output $out): void

Writes the action.

Parameters

$outOutput
Calls 3

Test cases 2§

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

Dedicated tests 1
Other tests reaching this symbol 1

Relations§

Instantiated in 4
Type checks 1
Type declarations 1