Skip to main content

Module semantics

Module semantics 

Source
Expand description

SQL semantics shared by static analysis and runtime adapters.

Modules§

age_cypher
SQL argument rules and result-column conversions for Apache AGE Cypher calls.
aggregates
Aggregate discovery and expression equivalence for SQL grouping.
conflict
Unique-index inference, target validation, and SQL predicate implication.
constraint_catalog
Read-only relation constraint declarations.
cte_names
Enumerate the CTE names owned by a query and its sources.
cte_strategy
Shared CTE scheduling decisions for execution and traversal analysis.
cte_validation
PostgreSQL statement ownership rules for data-modifying WITH definitions.
effects
Classify SQL plans by database, session, and transaction effects.
foreign_keys
Foreign-key comparison types, null matching, and normalized key values.
generated_values
PostgreSQL rules for the values a statement writes to the columns whose values a table generates: identity columns and generated columns.
graph_commands
SQL argument coercion and diagnostics for native and AGE graph commands.
graph_functions
Graph-name selection and argument rules for SQL graph table functions.
grouping_sets
PostgreSQL-compatible grouping-set preparation after input schema binding.
insert_values
A single INSERT ... VALUES row, which PostgreSQL processes like the target list of a SELECT without FROM.
join_predicates
Join conjunct analysis and structural side binding.
key_identity
The physical document identity an integer primary-key value names.
locking
SQL row-lock restrictions, propagation, and mutation lock strength.
merge
MERGE clause scopes, target privileges, and positional RETURNING schemas.
mutation_inputs
Row-independent mutation input shapes.
mutation_patch
Constraint dependency analysis for UPDATE’s storage patch path.
mutation_privileges
Mutation target privilege analysis.
mutation_qualifiers
Relation qualifier visibility in mutation expressions.
mutation_rows
Declared and hidden column schemas shared by mutation analysis and row execution.
parameters
Configuration parameters: their definitions and values, and the lifetimes of SET, SET LOCAL and temporary function configuration over values the host retains.
partition
Declarative partition validation, value comparison, and routing semantics.
period
Canonical range values used by temporal keys and references.
portals
Cursor declaration restrictions and command descriptor diagnostics.
privileges
Semantic base-column privilege analysis for query sources.
referential
Foreign-key action discovery across partition and inheritance metadata.
retrieval
Retrieval argument binding and weight semantics, independent of physical search.
returning
RETURNING target schemas, alias visibility, projection expansion, and static analysis.
row_count
SQL LIMIT and OFFSET bigint conversion and diagnostics.
rules
Rewrite-rule declaration and RETURNING contracts.
runtime_scalars
Runtime scalar argument and row-context rules.
scalar_projection
Argument validation and short-circuit semantics for score and highlight projections.
sets
Set-returning expression binding, validation, and dependency rewriting.
source_filters
Source qualifier filters and checked SQL integer carriers.
table_function_arguments
Argument contracts for analyzer and session table functions.
table_locks
Explicit relation-lock authorization and stored-view target scope.
text_indexes
Validation of text-retrieval field references against relation and index metadata.
view_mutation
View mutation target identity, declared columns, assignment and MERGE validation.
view_privileges
Privilege checks at each view boundary before DML rewrite or trigger dispatch.
view_rewrite
PostgreSQL 18 automatically updatable view analysis and DML rewriting.
volatility
SQL function volatility and expression rewrite safety over catalog metadata.
windows
Window expression classification.

Structs§

ColumnDefinitionRequest
A function in FROM with the column definition list written for it.
ControlledUserTableFunction
MembershipOperands
An equality set or its SQL three-valued negation. The operands still require the consumer’s ordinary safety and constant checks.
ProjectionLabels
An immutable positional descriptor borrowing existing names and retaining admitted decoding storage only where naming requires it.
ProjectionStarMetadata
ResolvedJoinUsing
ResolvedUserTableFunction
TableFunctionAnalysis
TableFunctionTypeRequest

Enums§

FunctionName
MembershipItem
MembershipItems
Analyzed expressions or the borrowed resident values left after constant array folding.
MultiFieldMatchShape

Constants§

DOC_ID_COLUMN
META_DOC_ID_COLUMN
META_QUALIFIER
META_SCORE_COLUMN
SCORE_COLUMN
SETOF_COLUMN_DEFINITION_PREFIX
The marker a column definition list keeps for a column declared SETOF.
TABLE_OID_COLUMN
XMIN_COLUMN

Functions§

alias_join_physical_schema_with_control
alias_join_schema
alias_join_schema_with_control
apply_table_function_aliases
apply_table_function_aliases_with_control
bound_projection_expression
bound_projection_expression_with_control
Generate a reference to one bound logical position. Ambiguous names retain an ordinal reference; uniquely addressable names preserve their original qualifier.
bound_source_column_names
bound_source_column_names_with_control
Select a stored declaration’s bound columns before copying its public labels.
bound_source_schema
bound_source_schema_with_control
builtin_aggregate_dispatch_name
Borrow the local name for an already selected built-in aggregate kernel. This does not select a routine: registered aggregates and scalar overloads must keep their selected identities before entering built-in execution. No name or argument allocation occurs for each input row.
builtin_function_dispatch_name
Resolve reserved system-schema aliases only when the local name belongs to that schema’s built-in surface. Ordinary qualified names stay intact for runtime callbacks and user-defined routine lookup. Already normalized names borrow the original full name or local-name slice; ASCII case folding owns one buffer.
builtin_function_dispatch_name_with_control
collect_expr_qualifiers
collect_frame_bound_subquery_ids
collect_from_qualifiers
collect_subquery_ids
contains_retrieval
Whether a scalar expression contains a posting-list retrieval operator. Relational executors use the same classification as access-path planning so registered retrieval calls never fall through to scalar evaluation.
cte_definition_references
The WITH items visible to and named by one definition, respecting nested WITH scopes.
cte_external_references
Already-visible bindings read by a definition, respecting nested WITH scopes.
cte_external_references_with_control
Select borrowed enclosing names under the invoking allowance, preserving reachable nested WITH semantics and identifier decoding.
cte_reference_name
Decode a source reference into a CTE identifier. Qualified relations never resolve to CTEs.
cte_references_own_name
Only recursive definitions can reference their own binding.
cte_references_own_name_with_control
doc_id_value
expand_bound_projection_stars
expand_bound_projection_stars_in_scope
Bare stars expand the local FROM output, while qualified stars can select an admitted enclosing namespace.
expand_from_star_columns
expect_column_name
expr_contains_function
expr_contains_subquery
expr_has_unqualified_column
expr_is_null_free
True when the expression can never evaluate to SQL NULL for any row: registered search functions, IS NULL tests, and boolean combinations thereof. Anything referencing column comparisons may yield NULL, so set-complement NOT would be unsound for it.
expr_qualifiers
flatten_and_filter_parts
from_qualifier_set
fts_query_is_jsonpath
The @@ operator doubles as a JSONPath match when the right-hand side is a $... path literal; that form evaluates row-level JSON and needs no text index.
function_has_implicit_row_input
Whether a selected builtin reads the current row through an implicit executor attribute. Such a call is not a constant even when it has no explicit operands; this dependency is independent of routine volatility.
function_implicit_row_input
The owned internal identity read by a native call with no written row operand.
function_projection_label
is_builtin_aggregate
is_builtin_aggregate_call
Classify the routine selected for a call, retaining qualified built-ins while allowing user scalar overloads with the same local name.
is_builtin_table_function
is_engine_pseudo_column
Whether column names a value the engine attaches to each row rather than one its table stores: the row’s document identity, its retrieval score, its relation and its creating transaction. A table column of the same name shadows it.
is_json_array_table_function
is_semantic_field_argument
Return whether a registered function consumes this argument as a relation-field identifier rather than as a scalar row value.
join_alias_columns
join_alias_columns_with_control
join_alias_input_schemas
Add a parenthesized JOIN alias to the input-side schemas for null-rejection analysis. Merged FULL JOIN columns belong to neither side exclusively because their value is a coalesce of both inputs.
join_alias_input_schemas_with_control
join_using_column_names_with_control
Select only the logical join column names through the same ordered layout used by physical join binding.
join_using_layout
join_using_layout_with_control
join_using_output_schema
Bind the visible and hidden output identities of a qualified join without constructing or executing the join. Static source-schema binding and the physical operator share this layout so an empty or correlated right side cannot lose its declared types.
join_using_output_schema_with_control
join_using_predicate
join_using_predicate_owned
lowercase_function_name_with_control
membership_operands
Borrow an IN list or its analyzed scalar-array comparison without dropping conversions. Empty ALL arrays stay scalar because they also accept a NULL left operand.
merge_action_attribute
Executor-only carrier for PostgreSQL 18’s merge_action() value. The attribute has no SQL name and therefore cannot collide with a target or source column named _merge_action.
multi_field_match_shape
mutation_clause_schema
The row scope of the clauses of a data-modifying statement other than RETURNING: the target, named by its name or alias, with its system columns, and the statement’s other sources. The old and new aliases of the target belong to RETURNING alone.
mutation_clause_schema_with_control
order_cte_plans
order_cte_plans_with_control
Order selected definitions without copying their names or bodies. The result retains its reference-array allowance until its consumer finishes.
ordered_cte_plans
ordered_plan_ctes
outer_join_nullable_qualifiers
Qualifiers whose rows can be synthesized as NULLs by an outer join cannot receive an arbitrary WHERE predicate before that join. A predicate such as right.id IS NULL accepts the synthesized row; pushing it into the right scan first can remove a real match, manufacture a NULL-extended row, and turn a non-result into a result. Keep predicates on these qualifiers above the outer join unless a separate rewrite has first reduced it to an inner join.
output_position_error
primary_command_cte_references
The WITH items named by a command’s own query arenas and source input.
primary_command_cte_references_with_control
primary_query_cte_references
The WITH items that the primary query names outside the items’ own definitions.
primary_query_cte_references_with_control
projection_columns
projection_label_at
Compute a projection’s PostgreSQL output column name. Standalone expressions use ?column?; repeated labels remain repeated until the final named-map compatibility boundary.
projection_labels_with_control
Capture labels for repeated observation. Aliases override individual projections; duplicate labels retain their original positions. Admit descriptor capacity before decoding any name.
qualify_unqualified_columns
qualify_unqualified_columns_with_control
query_output_position
Resolve an SQL92 output ordinal against the expanded SELECT list before using its type or physical expression.
query_plan_output_columns
query_plan_output_columns_with_control
query_plan_output_width_with_control
Observe declared output width without constructing or copying public labels.
reachable_command_cte_names
The WITH items a command reads, plus every data-modifying item and their dependencies.
reachable_command_cte_order_with_control
Apply the same reachability and dependency rules to a command’s WITH list.
reachable_plan_cte_names
reachable_query_cte_order_with_control
Reachable declaration indices in the native dependency order. Unread query definitions are omitted; data-modifying definitions are always included.
reachable_statement_cte_names
Resolve the shared dependency closure. Unreferenced SELECT items do not run, even when they contain volatile functions.
reachable_statement_ctes_with_control
resolve_join_using
resolve_join_using_with_control
Resolve the original USING/NATURAL namespace and coercions with the invoking request’s admission and both cancellation scopes. The returned owner retains only its completed names, types, alias and column buffer; lookup scratch retires before return.
resolve_runtime_table_function_binding
Select a call whose dynamic inputs have now produced values, preserving every statically declared argument type and the original SQL unknown-literal rules.
resolve_table_function_binding
resolve_table_function_binding_with_control
resolve_user_table_function
resolve_user_table_function_with_control
retrieval_function
returning_context_schema
returning_expression_schema
returning_expression_schema_with_control
returning_schema_for_target
Add OLD/NEW image bindings to an already-qualified, positional target schema. Each image retains the target column’s selected collation even when the image’s value is NULL.
scalar_table_function_default_column
select_execution_stmt
should_defer_distinct_limit
single_reference_plan_cte_names
Definitions with exactly one syntactic reference to their own binding, including references in unread nested definitions.
table_function_column_types
table_function_column_types_with_control
table_function_empty_schema
table_function_empty_schema_with_control
try_visit_input_values
Lend observed input values in traversal order and stop on the first callback error. COUNT(*) keeps its row demand separate from the values used by its FILTER and ORDER BY.
try_visit_input_values_with_control
Preserve both cancellation owners at every visited node, including COUNT(*) nodes that contribute no input-value callback.
user_function_composite_result
A named composite returned by a function expands to its live attributes in FROM, including a single composite OUT parameter.
user_function_composite_result_with_control
user_function_declared_columns
The columns a user function in FROM declares, before column aliases: a named composite result’s attributes, including those of a single composite OUT parameter, or else the OUT parameters. None for a function with neither, whose single column the FROM item names.
user_function_declared_columns_with_control
user_function_output_columns_for
user_function_output_columns_with_control
user_table_function_columns
Derive a user FROM function’s width from its result type before applying aliases. Only an anonymous record takes its shape from the column definition list; aliases never add fields to a scalar result.
user_table_function_columns_with_control
validate_table_function_alias_count
validate_table_function_alias_count_with_control
validate_table_function_column_definition
Check the column definition list of a function in FROM against the class of its result, as addRangeTableEntryForFunction does.
validate_table_function_column_definition_with_control
virtual_relation_mutation_candidate
Check spelling before requesting a catalog snapshot; an earlier user relation can still take precedence.
virtual_relation_mutation_error
visible_projection_source_position
visit_bound_projection_star_fields
Visit each visible field of a bound wildcard. Bare stars use the local FROM output; qualified stars preserve the selected enclosing namespace, LATERAL validation and physical field order. A non-wildcard returns false without invoking the consumer.
visit_bound_projection_star_metadata
visit_filter_parts_with_control
Visit the existing conjunction partitions in source order without allocating a flattened vector.
visit_input_values
Traverse values observed by an expression. COUNT(*) consumes rows, while its FILTER and ORDER BY still consume their own input values.
visit_outer_join_nullable_qualifiers_with_control
Visit nullable visible namespaces without copying relation identifiers or constructing an intermediate set.
visit_query_output_columns
Observe ordered positional output labels without copying the input descriptor. Explicit source aliases override individual labels. A set operation inherits its left input’s names; VALUES generates names for its first row. Return false only when the root has no output descriptor. Temporary decoded/generated labels retain their own leases through the callback and are released before the next label.
visit_source_qualifiers_with_control
Visit the visible FROM namespaces in source order without allocating their names.
with_projection_label
Lend one projection label through an observation, admitting any decoding workspace and retaining it until the callback returns.

Type Aliases§

JoinUsingLayout
ProjectionFieldVisitor