Skip to main content

Module result_check

Module result_check 

Source
Expand description

The final statement of a SQL function body checked against the declared result, as PostgreSQL’s check_sql_fn_retval checks it at creation and before execution.

Structs§

SQLFunctionResultColumn
A live attribute in the declared function result, in physical attribute order.
SQLFunctionResultLayout
The SQL-owned result decision. A lone row value is distinct from a tuple whose individual columns need assignment coercion. Domains remain scalar, even when their base type is composite.

Enums§

SQLFunctionResultKind
Whether the routine returns nothing, one output value, or the complete output tuple.

Functions§

check_sql_function_result
Check the final statement without exposing its execution layout to callers that only validate a definition.
declared_sql_function_result
Resolve the result declaration independently of a final statement.
sql_function_composite_columns
Read the live descriptor of a named row value. An anonymous row’s descriptor must come from expression analysis, rather than inspecting its values.
sql_function_result_layout
Decide whether the final statement returns a single value or its complete row, using the same assignment rules at creation and invocation.
validate_anonymous_record_result
SQL target lists assign each column; a whole SQL or procedural record keeps its producer’s field identities.
validate_sql_function_record
A whole returned record must match the caller’s tuple descriptor; its fields are not assignment-coerced as independently selected columns are.
validate_sql_function_record_identity
Validate the descriptor carried by the selected runtime row, including CASE branches and materialized intermediate rows whose record shapes differ.
validate_sql_function_record_rows
A SQL set-returning function materializes one record descriptor for all non-null rows before the caller checks the declared result. Inspect borrowed values without copying their fields.