Expand description
Modules§
- bit_
string - SQL bit-string input, length constraints and output over Core’s packed values.
- composites
- Composite type values through the statement’s catalog: attribute metadata,
record_ininput and the coercion of rows and records to a composite type. - datums
- Read retained physical scalar bytes only when a SQL operation observes the value. Type inspection, copying and NULL tests do not invoke this decoder.
- enums
- Enum label input and output, ordered label functions and I/O casts through the statement’s catalog.
- variadic_
any - Built-ins declared
VARIADIC "any": an explicitVARIADIC arrayargument supplies the variadic values element by element, flattening every dimension, asPostgreSQL’sextract_variadic_argsdoes.
Structs§
- Canonical
Multirange - Canonical
Range - Compiled
Like Pattern - A LIKE/ILIKE pattern compiled once for repeated evaluation. ASCII values use a byte matcher; Unicode retains character-oriented
_semantics. ILIKE matches the input collation’s lowercase forms of the input and of the whole pattern, asPostgreSQL’sGeneric_Text_IC_likedoes. - Date
Order Scope - Restore the calling thread’s date order when the input scope ends.
- Engine
Value Catalog - Adapt a scalar context without requiring embedders that only provide domain or composite metadata to implement enum support.
- Eval
Context - Interval
Fields - The months, days and microseconds of an interval.
- Interval
Style Scope - Restore the invoking thread’s interval input/output style on every exit.
- Range
Value Descriptor - Regex
Cache - A logical session’s bounded regular-expression cache. The supplied allowance owns pattern keys, cache slots and compiled contexts. Active calls temporarily remove their entry so independent workers never serialize matching on this lock. In-flight entries remain charged; at most 32 completed patterns are retained.
- Regex
Cache Scope - Enter a session’s cache on this thread, restoring its caller on every exit.
- Regex
Matches - The rows of one
regexp_matchescall. LikePostgreSQL’s first call, preparing the cursor finds every match; the cursor owns the input’s code points and the match spans, so a caller can draw each row under its own control. - Regex
Split - The pieces of one split. Preparing the cursor finds every match; the cursor owns the input’s code points and the match spans, so a caller can draw each piece under its own control.
- Resolved
Cast - A conversion’s immutable selection, without retaining a row value or a catalog decision.
- Resolved
Numeric Operator - A selected builtin numeric operation. Every evaluation still converts all operands in order and uses the invoking memory and cancellation controls.
- SQLRecord
Fields - Record values and declared field identities from one pinned catalog generation. Constructing the view does not read or copy any field value.
- Statement
Cancellation Scope - Runs the current thread under one statement’s cancellation until it drops, restoring the enclosing statement’s so nested statements and workers return to their caller’s.
- Temporal
Input Context - A copyable context passed from a statement to its workers. Entering it reproduces every captured input exactly, including the absence of a transaction clock, so a thread never keeps an earlier statement’s clock.
- Temporal
Input Scope - Transaction
Clock Scope - Enters a transaction start for the current thread until it drops, restoring the clock entered before it. The engine enters its transaction timestamp at every statement boundary, and the parallel executor enters the dispatching thread’s clock on each worker.
Enums§
- BTree
Input - A borrowed input in the selected class’s equality domain. Arrays retain their shape even when the original carrier is an atomic catalog vector. Image records keep a distinct observation contract.
- Float
Width - Integer
Width - Numeric
Cast - An immutable builtin numeric conversion selected from resolved source and destination identities.
- Range
Comparison Value - Admitted range bounds shared by comparison and exact SQL equality-key consumers. Parsing and normalization retain the caller’s reservations until this value is released.
- RowKey
Space - Read-only row interface used by the expression evaluator. Most callers
use a materialised
ResultRow, while hot execution paths can expose a projected value slice without rebuilding a string-keyed map for every row. The address space of a row lookup’s column keys.
Traits§
- Catalog
Input Functions - Catalog input needed after analysis selects a type for an unknown literal. Domain array input includes each element’s constraints, so the caller must retain this value rather than read the text again at execution.
- Engine
Hook - Engine-side hook that scalar function evaluation calls for stateful
sequence and user-defined functions. Query-valued expressions are not
accepted here: lowering assigns them physical query-plan slots executed by
uqa-execution::ScalarSubqueryRunner. - Range
Construction - Operations selected by the range definition, independently of its endpoint layout. Invocation state and effects belong to the caller; observation never uses this interface.
- RowLookup
- SQLValue
Catalog - Type metadata and enum support used to observe already admitted SQL values. Implementations borrow one statement catalog generation and never invoke type input.
Functions§
- array_
dimensions - Return every dimension of a rectangular array value.
- array_
transform_ argument_ positions - Map call-order arguments onto the declared
array_sortandarray_reverseslots.Nonemeans the arity or a named argument does not select a catalogued overload. - array_
transform_ argument_ positions_ with_ control - array_
value_ to_ string - bound_
scalar_ function_ strictness - Return the
PostgreSQL18 strictness contract selected by a structural function binding. Parser-owned syntax and overload-specific built-ins must be classified byFunctionDispatch, never by their diagnostic display label. - builtin_
named_ args - Reorder a built-in call’s named arguments into declared positions, or
Nonewhen the function has no such signature. - builtin_
scalar_ function_ strictness - call_
argument_ name - Borrow the name attached to a supplied call argument without evaluating its value.
- call_
argument_ value - Return a call argument’s value expression after stripping named and explicit
VARIADICsyntax markers. - cast_
value - Cast a value to the named SQL type, mirroring
CAST(expr AS ty). Types outside the engine’s coercion surface returnSQLError::Unsupported. - cast_
value_ from - Cast a value while preserving an explicitly declared source type when the runtime carrier erases it.
PostgreSQL18 integer-to-bytea/oidcasts andxidcast rejection require the source’s declared identity. - cast_
value_ from_ with_ control - cast_
value_ with_ numeric_ resolution_ with_ control - Return an immutable numeric conversion when the ordinary catalog-aware cast selected one. Callers may retain it only within the same prepared expression and type-schema scope; the first evaluation keeps the original resolution, callback and failure order.
- cast_
value_ with_ resolution_ with_ control - Return the builtin scalar selection reached by an ordinary successful conversion. The caller may reuse it only for the same immutable expression and type-schema identity with explicit builtin type names.
- cast_
value_ with_ type_ resolution - Cast a value after resolving catalog-owned types and enforcing domain constraints before exposing a base-type carrier.
- cast_
value_ with_ type_ resolution_ with_ control - Resolve catalog inputs at their external handoff, then admit SQL-owned names, element conversions and output before constructing them.
- catalog_
output_ required - A value whose text is owned by the SQL catalog reached a context-free conversion. Catalog-aware callers render these carriers before delegating here.
- check_
constant_ similar_ translation - Translate the SQL form’s constant pattern and escape while planning.
PostgreSQLinlinessubstring(text, text, text)and folds a constantsimilar_to_escapecall, so its errors surface even when no row is read; the call itself is unchanged. - check_
statement_ cancellation - Report the running statement’s cancellation with the reason its token was canceled for, or
Okwhile it may continue. Work outside any statement has no cancellation to observe and continues. - clock_
timestamp_ micros - Read the platform wall clock as Unix microseconds.
- coercion_
type_ name - compare_
btree_ inputs_ with_ catalog_ and_ control - Invoke the selected native B-tree comparison over admitted inputs. This shares scalar, array and record owners; it does not execute input, domain checks or range canonicalization. Pattern support explicitly ignores the invoking collation, while ordinary record fields retain their own descriptors.
- compare_
btree_ inputs_ with_ invocation_ state - The selected support function’s private state is distinct from the shared type support used by nested array and record fields. Its caller retains this state for the support function’s lifetime.
- compare_
grouping_ values_ with_ enum_ catalog - Order internal equality groups by physical enum identity, including nested keys. This ordering is not exposed as SQL ORDER BY and never observes an enum label merely to eliminate duplicates.
- compare_
nullable_ with_ control - compare_
record_ images_ with_ catalog - Compare admitted records using
PostgreSQL’s image support function. Reached field identities and arity share ordinary record comparison’s lazy checks; field images use the existing controlled SQL Datum codec. - compare_
selected_ grouping_ values_ with_ catalog - Preserve selected scalar types in internal equality grouping, retaining enum identity order rather than observing labels.
- compare_
selected_ values_ with_ catalog - Compare an admitted ordering key under its selected SQL type. The caller controls top-level NULL placement; this never infers a range type from a string.
- compare_
typed_ values_ with_ catalog_ and_ collation - Compare already-bound values with the selected collation. Arrays carry it to their elements; record fields select their retained descriptors independently. NULL placement and unreached fields preserve the ordinary comparison’s lazy behavior.
- compare_
typed_ values_ with_ control - Compare already-bound values, preserving type operator failures and total container NULL semantics. Callers supply top-level NULL placement and must apply operator-selected casts first.
- compare_
typed_ values_ with_ enum_ catalog - Compare one physical ordering key with its private scalar enum call state. Nested array/record fields use the catalog’s shared type comparison state.
- compare_
unicode_ with_ control - Compare the deterministic
PostgreSQLunicodebuilt-in (root ICU, tertiary strength, normalization checking off). Byte-distinct strings retain distinct equality classes even when their Unicode weights match. - compare_
with_ control - Compare with the existing two-valued selector convention that SQL UNKNOWN sorts as equal.
- core_
value_ to_ json - Enum carriers need catalog label output and are rejected rather than rendered from their storage key.
- current_
regex_ cache - Capture the current session cache for a worker. Outside a session, no cache survives the call and the ordinary resource contract is unchanged.
- declared_
multirange_ datum_ with_ control - The caller supplies an already normalized multirange; serialization neither sorts members nor invokes canonicalization.
- declared_
range_ datum_ with_ control - Preserve a completed range’s identity and admitted bounds in the physical carrier, without repeating any selected construction operation.
- equal_
selected_ values_ with_ catalog - Compare equality keys with their selected scalar type, including SQL grouping’s equal NULLs.
- equal_
selected_ values_ with_ engine - Evaluate a selected SQL equality predicate with its invoking session. Unlike grouping keys, cross-type datetime operands can require the session timezone.
- equal_
typed_ values_ with_ catalog_ and_ collation - Equality uses the same reached collation diagnostics; every fixed built-in is deterministic, so successful equality retains byte equivalence without computing unused Unicode weights.
- equal_
typed_ values_ with_ enum_ catalog - Compare already-bound group/hash keys without enum output. Physical enum
identities use the same equality as
enum_eq, including inside containers. - eval
- Evaluate a value-producing AST expression against one row and parameter context.
- eval_
array_ access_ with_ control - The caller owns expression scheduling and input guards; SQL owns NULL reachability, bound conversion and selected array output.
- eval_
binary_ values - Apply a binary SQL operator to values that have already been evaluated. Execution engines use this when a hot path compiles expression traversal ahead of time but must retain the evaluator’s exact comparison, numeric promotion, NULL, overflow, and division-by-zero semantics.
- eval_
binary_ values_ with_ control - Evaluate the existing binary operator while owning every value producer and comparison workspace under one allowance.
- eval_
binary_ values_ with_ engine - Evaluate already produced operands with their selected integer width and live session inputs.
- eval_
binary_ values_ with_ integer_ width - Evaluate an operator while retaining the integer type selected by SQL
operator resolution. The dynamic
Valuecarrier stores all integers asi64, so expression plans pass this width alongside the operands. - eval_
binary_ values_ with_ integer_ width_ with_ control - Preserve the selected integer width without separating an allocated result from its owner on errors.
- eval_
bound_ builtin_ function_ call - Evaluate a call’s argument list, unwrapping
name => value - eval_
builtin_ function_ call - Execute a call whose stored binding selects a built-in routine. Dynamic runtime callbacks and SQL routines must not override this stable binding.
- eval_
builtin_ function_ call_ with_ control - Execute SQL-owned native built-ins with admitted arguments and the caller’s catalog/comparison context. Session and user-function callbacks keep their separate execution boundaries.
- eval_
comparison_ truth - Compare two values without allocating an intermediate
Value::Bool.Nonerepresents SQL UNKNOWN, including an undecided anonymous row comparison. - eval_
comparison_ truth_ with_ control - Evaluate the same three-valued comparison while admitting the native numeric, JSONB and array comparison workspace to the caller’s allowance.
- eval_
comparison_ truth_ with_ deferred_ state - Primitive scalar comparisons need no catalog or private enum call state. Resolve that state only when the evaluated carriers require the general comparison path; operand evaluation and its SQL ordering remain the caller’s responsibility.
- eval_
comparison_ truth_ with_ engine - Borrow physical type metadata from scalar hooks even when the embedder provides no enum capability.
- eval_
comparison_ truth_ with_ enum_ catalog - Observe scalar and nested enums through the caller’s catalog, preserving private scalar/row call state, shared type support state and ordinary three-valued rules.
- eval_
distinct_ boolean - Evaluate Boolean nodes synthesized by DISTINCT syntax. Unlike written Boolean contexts, their already-Boolean field comparisons may contain set-returning inputs. Row comparisons retain
PostgreSQL’s left-to-right short circuit. - eval_
float_ arithmetic - Apply arithmetic at its resolved float width before widening the storage carrier.
- eval_
float_ arithmetic_ with_ control - Evaluate the same width-specific arithmetic with controlled numeric coercion workspace. The resulting float carrier is inline.
- eval_
function_ call - Execute a scalar function after its argument expressions have already been evaluated.
- eval_
generated_ function_ call_ with_ control - Execute a built-in selected by generated-column validation. This boundary has no session, host-function or query callbacks; general runtime dispatch remains with
eval_function_call. Argument values arrive already admitted by their producers. - eval_
numeric_ operator - eval_
numeric_ operator_ with_ control - Evaluate the existing selected numeric overload while casts, type names and intermediate values remain owned by the original allowance.
- eval_
numeric_ operator_ with_ resolution - Evaluate before retaining an immutable builtin numeric selection. Unknown, domain and other catalog-defined operands preserve their original conversion path.
- eval_
record_ comparison_ truth_ with_ engine - Compare record operands selected by SQL syntax. A record-valued column, cast or parameter retains record field operators even when its carrier is an anonymous
Row; only two uncast ROW constructors select three-valued row comparison. - eval_
value_ comparison_ truth_ with_ engine - Compare complete SQL values selected by a consumer such as CASE, NULLIF or ANY. Anonymous record carriers retain record operators; three-valued ROW constructor comparison is selected separately by expression syntax.
- evaluate_
call_ args - Return the
PostgreSQL18 strictness contract for a built-in scalar call when its implemented overload is known. - format_
real - Format a real value using
PostgreSQL’s shortest decimal and exponent thresholds. - format_
regtype_ value - Format a scalar or array OID carrier using the catalog-aware output function of a
reg*type.Nonemeans the declared type is not one of the supported alias types or the value is SQL NULL. - format_
regtype_ value_ with_ control - Retain a resolver’s returned spelling and construct SQL-owned array and fallback text under the invoking allowance.
- in_
range in_range(val, base, offset, sub, less)for a non-nullvalandbaseof one ordering type and anoffsetof the typetransformFrameOffsetselected for it.- in_
range_ with_ engine - Apply the ordering family’s frame predicate with live session calendar arithmetic.
- integer_
width_ for_ literal - integer_
width_ for_ type - invalid_
boolean_ input - The error
boolinreports for text that is not a boolean. - invalid_
numeric_ input - The error
numeric_inreports for text it cannot read. - json_
strip_ nulls_ argument_ positions - Map call-order arguments onto the declared
(target, strip_in_arrays DEFAULT false)slots.Nonemeans the arity or a named argument does not select either catalogued overload. - multirange_
from_ ranges - multirange_
from_ ranges_ with_ operations - Normalize already constructed members without repeating their input or canonical calls. Every union invokes the selected canonical operation once, as range construction does.
- negate_
value - Apply
PostgreSQLprefix-while retaining the operand’s declared type. - negate_
value_ with_ control - parse_
boolean_ input boolin:PostgreSQL’sparse_boolover trimmed text, accepting case-insensitive prefixes oftrue,false,yesandno,on, at least two letters ofoff, and1and0.- parse_
multirange - parse_
multirange_ with_ operations - Parse each member through the same range constructor before sorting and joining overlapping or adjacent members.
- parse_
pg_ array_ literal - Parse a
PostgreSQLarray literal ({1,2,3},{"a b",NULL},{{1,2},{3,4}}) into nested lists of string/NULL values; the caller casts elements. - parse_
pg_ array_ literal_ with_ control - parse_
range - parse_
range_ with_ operations - Parse complete range syntax, then input the lower and upper endpoints in order. Already empty input does not invoke endpoint or canonical functions.
- parse_
uuid_ bytes - Parse every UUID input spelling accepted by
PostgreSQLinto network-order bytes. - quote_
ident - Double-quote unless the identifier starts with a lowercase letter or an underscore, holds only lowercase letters, digits and underscores, and is not a keyword other than an unreserved one (
quote_identifier). - range_
bound_ flags - Validate a range constructor’s explicit flags argument. The two-argument constructor supplies
Some("[)"); SQL NULL remains an error. - range_
from_ bounds_ with_ operations - Construct from already coerced, admitted, non-NULL endpoints;
Nonerepresents an unbounded endpoint. This does not repeat endpoint input or domain checks. Bounds are validated before the optional canonical call; the canonical result is returned without a second call or validation pass. - read_
catalog_ array_ input - Read an array whose elements are domains with the same input and constraint path as a catalog-aware cast. The resolved target preserves domain identity; a scalar outer domain remains the surrounding expression’s runtime coercion.
- read_
catalog_ input - Read a catalog-dependent constant once, retaining its typed datum in stored syntax.
- statement_
cancellation - The running statement’s cancellation token, which a thread dispatching part of the statement to a worker captures for the worker to enter;
Noneoutside any statement. - temporal_
date_ order - temporal_
interval_ style - transaction_
clock_ micros - The transaction start entered for the current thread, or
Noneoutside any statement. - truthy
- Whether a condition holds.
NULLdoes not; text, which reaches a condition only as anunknownliteral or parameter, holds whenboolinreads it as true (parse analysis rejects any other text); the engine’s numeric retrieval predicates hold when non-zero. - type_
comparison_ can_ fail - Declared SQL keys whose runtime values may require a fallible comparison operator.
- unknown_
function_ error function name(arg types) does not exist- the errorPostgreSQLraises when call resolution fails (SQLSTATE 42883).- validate_
json_ object_ key_ type - JSON object keys must be scalar SQL datums, including when an array-shaped catalog vector has a distinct runtime carrier. Each constructor retains its own NULL-key diagnostic.
- validate_
legacy_ vector_ comparison - Validate the layout required by the
oidvectorscalar equality, ordering and hashing operators. Array operators onint2vectorpermit dimensionless arrays. - validate_
named_ argument_ order - Enforce
PostgreSQLfunction-call ordering before overload resolution. Positional arguments must precede named arguments, and each explicit name may occur only once. - validate_
named_ argument_ order_ with_ control - value_
comparison_ can_ fail - Whether an opaque value key can suppress a SQL operator failure. A single such input remains legal until an operator compares it.
- value_
to_ json_ text - Render an engine value as
PostgreSQLJSON input text without losing the lexical representation of values already typed asjsonorjsonb. - value_
to_ string - Produce SQL text, including errors from type output functions.
- value_
to_ string_ with_ control - value_
to_ tensor - Coerce a
Valueinto a tensor: an array of homogeneous numeric vectors. Used byTENSOR(N)columns to store chunk embeddings for one row while still indexing each vector element. - value_
to_ tensor_ with_ control - value_
to_ text - value_
to_ text_ with_ control - value_
to_ vector - Coerce a
Valueinto aVec<f32>if it is a homogeneous numeric list (used to read vector literals fromARRAY[...]or$NVector params). - value_
to_ vector_ with_ control - value_
type_ name - values_
equal_ nullable_ with_ control - values_
equal_ with_ control - variadic_
argument_ value - Return the value expression carried by an explicit
VARIADICmarker, including one nested inside a named argument. - vector_
value_ to_ string PostgreSQL’s legacy vector text format separates values with spaces.- visit_
record_ image_ fields_ with_ catalog - Visit each live field’s selected identity and admitted image, with
Nonefor NULL. The callback borrows each image only while its controlled owner remains live. Execution owns framing and exact-key production; observation invokes no field operators or type input. - with_
btree_ input - Observe one already admitted bound under its selected class. The callback cannot outlive physical decoding or a required carrier projection; unchanged values and vector arrays are borrowed. Collation and support invocation remain the consuming operation’s responsibility.
- wrap_
variadic_ argument - Wrap the last actual argument of an explicit
VARIADICinvocation while preserving a named-argument marker at the top level.