classAlterTableRule
final class AlterTableRule
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.
Lowers the statements built on AlterTableStmt and the partition actions.
Rule: PG-ALTER-TABLE-LOWER-001. Scope: AlterTableStmt, alter_table_cmds, partition_cmd, index_partition_cmd. The actions themselves are lowered by AlterCommandRule. A relation written as relation_expr keeps ONLY; a qualified_name never has it. Termination: lists are flattened iteratively. Source: https://www.postgresql.org/docs/17/sql-altertable.html. Status: Implemented.
Methods§
Lowers AlterTableStmt.
Parameters
$statement | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 7
- class-const AlterTableRule::MOVE() line 84
- new MoveAll line 88
- class-const AlterTableRule::ALTER() line 96
- static-call ImplementationGap::production() line 96
- new RelationReference line 98
- new AlterTable line 100
- method-call AlterTableRule::commands() line 100
public function commands(Node $list): list<AlterCommand>Lowers alter_table_cmds, partition_cmd or index_partition_cmd.
Parameters
$list | Node |
Returns
list<AlterCommand>Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 4
- method-call AlterTableRule::partition() line 113
- new AlterCommandRule line 116
- method-call Lowering::items() line 117
- method-call AlterCommandRule::command() line 118
public function partition(Node $command): AlterCommandLowers partition_cmd or index_partition_cmd.
Parameters
$command | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 10
- new AttachPartition line 135
- new ParentTable line 135
- method-call PartitionRule::bound() line 135
- new PartitionRule line 135
- new DetachPartition line 136
- class-const DetachMode::Concurrently() line 136
- class-const DetachMode::Plain() line 136
- class-const DetachMode::Finalize() line 137
- new AttachIndex line 138
- static-call ImplementationGap::production() line 139
Private surface 3§
Implementation details, listed for orientation only.
private const ALTER = ['AlterTableStmt: ALTER TABLE relation_expr alter_table_cmds' => [\SqlSemantics…private const MOVE = ['AlterTableStmt: ALTER TABLE ALL IN_P TABLESPACE name SET TABLESPACE name opt_…private Lowering $loweringTest cases 3§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.