Expand description
Internal SQL AST. Lifts the relevant subset of the libpg_query
protobuf tree into a Rust enum the compiler walks. Statements not
yet supported parse cleanly but compile to
crate::SQLError::Unsupported.
Structs§
- Alter
Role Stmt - Alter
Routine Owner Stmt - Alter
Routine Stmt ALTER FUNCTION | PROCEDURE | ROUTINE name[(input_types)] ...with an optional exact declared input identity.- Alter
Sequence - Alter
Table Stmt - Alter
View Options Stmt - Auto
Increment - Durable sequence provenance for a
SERIALor identity column. - Auto
Increment Owner - Durable owner of an implicit sequence. Inherited
SERIALdefaults and declarative partitions copy this owner unchanged, so truncating a child cannot reset a sequence owned by its parent. - CTE
- Column
Def - Create
Foreign Server - Create
Foreign Table - Create
Function CREATE [OR REPLACE] FUNCTION | PROCEDURE.- Create
Index - Create
Role Stmt - Create
Rule - Create
Sequence - Create
Table - Create
Trigger - CteCycle
Clause PostgreSQLrecursive-CTE cycle detection metadata.- CteSearch
Clause PostgreSQLrecursive-CTE traversal-order metadata.- Declare
Cursor Stmt - Delete
Stmt - Detached
Partition Constraint - Drop
Function Item - One
DROP FUNCTION/DROP PROCEDUREtarget. - Drop
Function Stmt DROP FUNCTION [IF EXISTS] name[(argtypes)] [, ...]and theDROP PROCEDUREequivalent.- Drop
Role Stmt - Drop
Rule - Drop
Stmt - Drop
Trigger - Fetch
Cursor Stmt - Foreign
Key - Table-level foreign key. Compilation preserves an omitted referenced column list as empty; validation fills it from the primary key before publication.
- Foreign
KeyRef REFERENCES table[(column)]reference target.- Function
Binding - Function
Param - One declared parameter of a user-defined function or procedure.
- Generated
Column - Grant
Routine Item - Grant
Routine Stmt - Insert
Stmt - Join
Using - Locking
Clause - One
PostgreSQLrow-locking clause, including optionalOFtargets and theNOWAIT/SKIP LOCKEDwait policy. - Merge
Stmt - OnConflict
- OrderBy
- Partition
Identity Override - Partition
Spec - Projection
- Returning
Aliases - Routine
AclEntry - One explicit
EXECUTEACL entry.NoneonCreateFunction::execute_aclretainsPostgreSQL’s default public execution privilege. - Routine
Column Type Reference - Structured relation-column identity carried by a routine
%TYPEdeclaration until catalog binding resolves it to a concrete SQL type. - Routine
Invocation Binding - Concrete parameter and result types selected for one routine invocation.
- Routine
Security Attributes - Execution identity and planner leakproofness attached to a routine definition.
- Select
Stmt - SetConstraint
Name - SetOp
- Table
Check CHECK (expr)constraint with an optional name (CONSTRAINT <name> CHECK (...)).- Table
Constraint Set - Durable table-level constraints that do not fit in
ColumnDef. - Table
Function - One function inside a
FromClause::FunctionGroup. - Table
Hierarchy - Metadata shared by ordinary inheritance and declarative partitioning.
- Table
KeyConstraint - A table key whose columns are compared as one tuple.
- Transaction
Characteristics - Trigger
Transition Relation - Truncate
Target - Update
Stmt - Vacuum
Option - One parser-normalized
VACUUMoption. Keeping the parsed value in the SQL AST lets execution enforcePostgreSQL’s transaction-block error before validating command options. - Vacuum
Stmt - Vacuum
Target - One relation (and optional ANALYZE column list) named by
VACUUM. - Window
Frame - Window
Reference - Window
Spec
Enums§
- Alter
Routine Kind - Routine namespace selected by
ALTER FUNCTION,ALTER PROCEDURE, orALTER ROUTINE. - Alter
Table Action - Alter
View Kind - Alter
View Options Action - Auto
Increment Kind PostgreSQLsyntax that supplies an omitted column value from an implicit sequence.SERIALis a sequence-backed default, while identity columns retain a separate generation attribute and do not have a column default.- Binary
Op - Column
Type - CteMaterialization
- The planning fence requested for one common-table expression.
- Cursor
Direction - Discard
Target DISCARDtarget. MirrorsPostgreSQL’sDiscardMode.- Drop
Kind - Event
Enable Mode - Expr
- Scalar expression nodes the compiler handles.
- Foreign
KeyAction - Foreign
KeyMatch - Frame
Bound - Frame
Mode - From
Clause - Function
Body - Body of a user-defined routine.
- Function
Dispatch - Structural identity for parser-owned expressions and overload-specific built-in implementations. These variants occupy no SQL function-name namespace.
- Function
Parallel PARALLEL UNSAFE,PARALLEL RESTRICTED, orPARALLEL SAFEroutine metadata.- Function
Param Mode - Parameter mode of a
CREATE FUNCTION/CREATE PROCEDUREargument. MirrorsPostgreSQL’sFunctionParameterMode. - Function
Resolution Error - Static function-call failure discovered while binding declared argument types.
- Function
Returns - Declared result shape of a user-defined function.
- Function
Volatility IMMUTABLE/STABLE/VOLATILEmarker.- Generated
Column Kind - Join
Kind - Lock
Strength PostgreSQLrow-lock strength, strongest last.- Lock
Wait - Wait policy for a row-locking clause.
- Merge
When - Nulls
Order - OnCommit
Action ON COMMITbehavior retained with a temporary table definition.- OnConflict
Action - Partition
Bound - Partition
Range Datum - Partition
Strategy - Range
Function Operation - Operation selected for one typed range or multirange call.
- Range
Subtype - Relation
Persistence PostgreSQL’spg_class.relpersistencecontract.- Role
Attribute - Routine
Config Action - Routine
Variadic Mode - Call syntax selected for a routine’s variadic parameter.
- Rule
Event - Sequence
Restart - Physical restart action carried by
ALTER SEQUENCE. - SetOp
Kind - Statement
- Table
KeyConstraint Kind - Transaction
Isolation Level - Transaction
Stmt - Trigger
Deferrability - Trigger
Event - Trigger
Timing - Vacuum
Option Value - Window
Reference Kind
Functions§
- is_
builtin_ aggregate_ function - Return whether
nameis a built-in aggregate understood by the planner.
Type Aliases§
- Generated
Function Dependency - Value
Expr Exprrestricted to value-producing forms used byINSERTrows.