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

ALTER [ COLUMN ] ... SET STATISTICS: the statistics target of a column, or DEFAULT.

Mirrors AT_SetStatistics. An index column is named by its number. PostgreSQL 17 accepts DEFAULT, which is the target -1 of earlier releases. Source: https://www.postgresql.org/docs/17/sql-altertable.html.

Setting a statistics targetdoctest
$statement = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ALTER INDEX i ALTER COLUMN 1 SET STATISTICS 100');
    $statement->statement->commands[0]->column->digits // => '1'

Properties§

public SignedNumber|null $target

Methods§

public function __construct(
    public Name|IntegerConstant $column,
    public SignedNumber|null $target,
)

Parameters

$columnName|IntegerConstantThe column, by name or, for an index, by number
$targetSignedNumber|nullThe target; null for DEFAULT
public function deriveClause(Derivation $derivation, Environment $environment): void

Checks that a named column exists.

Parameters

$derivationDerivation
$environmentEnvironment
Calls 2
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 2
Type checks 1