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

Derives CREATE TABLE and CREATE FOREIGN TABLE.

Rule: PG-TABLE-DEFINITION-001. The new table is named as written; a temporary table with an unqualified name belongs to the temporary schema pg_temp, and inside CREATE SCHEMA an unqualified table belongs to the schema being created. The statement provides the declaration of PG-TABLE-DECLARATION-001 and records it as its own relation fact. The parents of INHERITS and PARTITION OF are resolved (PG-TABLE-TARGET-001); a parent of INHERITS must be a table or a foreign table (PG-RELATION-KIND-001). Every expression of the definition (constraints, generated columns, partition keys) is derived where the new table is the only visible relation, its system columns included; defaults and partition bound values see no column. Problems: a column name written twice, a column named like a system column, more than one primary key, an array of a serial type, a primary key, unique, exclusion or foreign key constraint of a foreign table, and the generation rules of PG-GENERATED-COLUMN-001. Source: https://www.postgresql.org/docs/17/sql-createtable.html. Termination: one pass over the elements. Status: Implemented.

Methods§

public function derive(
    CreateTable|CreateForeignTable $create,
    Derivation $derivation,
    ?Name $schema,
): void

Test cases 2§

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

Dedicated tests 2

Relations§

Instantiated in 5
Method calls 5