public final class PgAlterTable extends PgTableAbstract
Parser for PostgreSQL ALTER TABLE statements.

This class handles parsing of table alterations including adding/dropping columns, modifying constraints, changing table properties, managing triggers and rules, setting table ownership, and handling Greenplum partition templates.

  • Constructor Details

    • PgAlterTable

      public PgAlterTable(SQLParser.Alter_table_statementContext ctx, PgDatabase db, String tablespace, org.antlr.v4.runtime.CommonTokenStream stream, ISettings settings)
      Constructs a new AlterTable parser.
      Parameters:
      ctx - the ALTER TABLE statement context
      db - the PostgreSQL database object
      tablespace - the default tablespace name
      stream - the token stream for parsing
      settings - the ISettings object
  • Method Details

    • parseObject

      public void parseObject()
      Description copied from class: ParserAbstract
      Parses a database object from the current context. Must be implemented by concrete subclasses to handle specific object types.
      Specified by:
      parseObject in class ParserAbstract<PgDatabase>
    • parseGpPartitionTemplate

      public static void parseGpPartitionTemplate(GpPartitionTable tabl, SQLParser.Alter_partition_gpContext alterPartition, org.antlr.v4.runtime.CommonTokenStream stream)
      Parses Greenplum partition template specifications from ALTER PARTITION clause.
      Parameters:
      tabl - the Greenplum partitioned table to modify
      alterPartition - the ALTER PARTITION context
      stream - the token stream for parsing
    • parseAlterTableConstraint

      public PgConstraint parseAlterTableConstraint(SQLParser.Table_actionContext tableAction, PgConstraint constrBlank, String schemaName, String tableName, String location)