final class Declarations
Restricted visibility: declared "@visibility SqlSemantics\Platform\PostgreSql". Code outside that scope must not name this declaration.

Derives the declaration a table definition provides.

Rule: PG-TABLE-DECLARATION-001. The columns of a table defined by a column list are, in order: the columns of the INHERITS parents (a column of the same name in several parents, or in the list, is merged into one), then each column definition and the columns each LIKE clause copies at its position. A partition has the columns of its parent; a typed table the attributes of its type. Each column has the type of PG-COLUMN-TYPE-001. A column is NOT NULL when it is declared NOT NULL, is a serial or identity column, belongs to a PRIMARY KEY, or is copied from a NOT NULL column of a parent, a LIKE source or the partitioned table ("Not-null constraints are

  • always copied to the new table"); every other column can be NULL. A

column of a type the context cannot identify is declared with the type its name denotes on the search path. The declaration is complete only up to the first column whose type name is an error or whose parent, LIKE source or composite type the context does not declare. A column is generated when its definition has a generation clause, when it is inherited from a generated column of a parent or of the partitioned table, or when a LIKE clause copies a generated column and its options include GENERATED (INCLUDING GENERATED or INCLUDING ALL, applied in order with the EXCLUDING options; without it the copy is a regular column). An identity column is not generated in this sense. Source of the inheritance rule: MergeAttributes, tablecmds.c; https://www.postgresql.org/docs/17/ddl-generated-columns.html. The system columns are implicit (PG-SYSTEM-COLUMNS-001). A foreign table is declared as one, every other definition as a base table (PG-RELATION-KIND-001). Source: https://www.postgresql.org/docs/17/sql-createtable.html, https://www.postgresql.org/docs/17/ddl-inherit.html. Termination: one pass over the parents and the elements. Status: Implemented.

Methods§

public function listed(ListedColumns $form, Derivation $derivation, ColumnSet $set): void
public function includesGenerated(LikeClause $like): bool

Tells whether the options of a LIKE clause, applied in order, include the generation expressions.

Parameters

Returns

bool
Called from 1
Calls 2
public function generated(list<Clause> $qualifiers): bool

Tells whether column qualifiers hold a generation clause.

Parameters

$qualifierslist<Clause>

Returns

bool
Called from 1
public function constrain(Clause $element, ColumnSet $set): void

Test cases 1§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1

Relations§

Instantiated in 3
Method calls 3