Skip to main content

Module compiler

Module compiler 

Source
Expand description

Lift a PostgreSQL parse tree into the internal Statement AST.

The facade exposes compilation while statement-family modules own validation and lowering. Tree-shaped SELECT/DDL/expression lowering remains in the private tree module, and PostgreSQL type interpretation remains in the private types module.

Structs§

ParsedRegprocedureName
Parser-normalized routine name and optional exact input-type signature used by PostgreSQL’s regproc and regprocedure input functions.
ParsedRegtypeName
Parser-normalized type identity used by PostgreSQL’s regtype and regprocedure input functions. Components retain the parser’s distinction between aliases such as unquoted integer (normalized to pg_catalog.int4) and a quoted type named "integer"; type modifiers are intentionally omitted because these aliases identify a base catalog type.

Functions§

compile
parse_regobject_name
Parse the dotted identifier strings consumed by PostgreSQL’s reg* input functions. This follows SplitIdentifierString: surrounding component whitespace is ignored, quoted components collapse doubled quotes without case folding, unquoted components extend to a dot or whitespace and use ASCII case folding, and every component is clipped to PostgreSQL’s 63-byte identifier limit.
parse_regprocedure_name
Parse one routine-name string with either an omitted signature (regproc) or an exact signature (regprocedure). The caller owns the soft-error and cross-database policy because the two SQL input functions intentionally differ from ordinary DDL.
parse_regtype_name
Parse exactly one PostgreSQL type-name string without accepting adjacent SQL expressions. None is the soft-failure shape used for inputs such as an empty string or SETOF integer; lexical and type-name syntax errors are retained for the caller.
plan_only_for_test
Lower DROP FUNCTION / DROP PROCEDURE. Each target arrives as an ObjectWithArgs; the argument type list (when spelled) is preserved as a typed signature because routine identity includes (schema, name, argument types).
resolve_deferred_create_foreign_table
resolve_deferred_create_table