classColumnStatistics
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.
$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 Name|IntegerConstant $columnpublic SignedNumber|null $targetMethods§
public function __construct(
public Name|IntegerConstant $column,
public SignedNumber|null $target,
)Parameters
$column | Name|IntegerConstant | The column, by name or, for an index, by number |
$target | SignedNumber|null | The target; null for DEFAULT |
public function deriveClause(Derivation $derivation, Environment $environment): voidChecks that a named column exists.
Parameters
$derivation | Derivation | |
$environment | Environment |
Calls 2
- method-call Alterations::column() line 46
- new Alterations line 46
public function render(Output $out): voidWrites the action.
Parameters
$out | Output |
Calls 3
- method-call Output::keyword() line 54
- method-call Output::name() line 56
- method-call Output::node() line 58
Test cases 2§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
ColumnStatisticsTestcalls
Other tests reaching this symbol 1
Relations§
Instantiated in 2
- new SqlSemantics\Platform\PostgreSql\Lowering\Table\AlterCommandRule::column() packages/sql-semantics-postgres/src/Lowering/Table/AlterCommandRule.php:143
- new SqlSemantics\Platform\PostgreSql\Lowering\Table\AlterCommandRule::column() packages/sql-semantics-postgres/src/Lowering/Table/AlterCommandRule.php:149