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

A request to change the statistics target of extended statistics.

Mirrors PostgreSQL's AlterStatsStmt (defnames, stxstattarget, missing_ok). PostgreSQL 17 accepts DEFAULT, which is the target -1 of earlier releases. Source: https://www.postgresql.org/docs/17/sql-alterstatistics.html.

Changing a statistics targetdoctest
$statement = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ALTER STATISTICS IF EXISTS s SET STATISTICS 100');
    $statement->toString() // => 'ALTER STATISTICS IF EXISTS s SET STATISTICS 100'

Properties§

public DottedName $name
public SignedNumber|null $target
public bool $ifExists = false

Methods§

public function __construct(
    public DottedName $name,
    public SignedNumber|null $target,
    public bool $ifExists = false,
)

Parameters

$nameDottedNameThe statistics object
$targetSignedNumber|nullThe target; null for DEFAULT
$ifExistsboolWhether IF EXISTS is written
public function deriveStatement(Derivation $derivation): void

Derives nothing: the statement names a catalog object.

Parameters

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

Writes the statement.

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 1
Type declarations 1