classAlterStatistics
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.
$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 $namepublic SignedNumber|null $targetpublic bool $ifExists = falseMethods§
public function __construct(
public DottedName $name,
public SignedNumber|null $target,
public bool $ifExists = false,
)Parameters
$name | DottedName | The statistics object |
$target | SignedNumber|null | The target; null for DEFAULT |
$ifExists | bool | Whether IF EXISTS is written |
public function deriveStatement(Derivation $derivation): voidDerives nothing: the statement names a catalog object.
Parameters
$derivation | Derivation |
public function render(Output $out): voidWrites the statement.
Parameters
$out | Output |
Calls 2
- method-call Output::keyword() line 54
- method-call Output::node() line 58
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
AlterStatisticsTestcalls