Skip to main content

Module attributes

Module attributes 

Source
Expand description

The checks PostgreSQL makes of routine attributes, each at its own stage: compute_common_attribute for each clause in written order, the values compute_function_attributes and AlterFunction interpret, and the language, transforms, body and ROWS that CreateFunction examines.

Functions§

check_attribute_clauses
Reject the first clause, in written order, that a procedure cannot have or that repeats an earlier clause, as compute_common_attribute and compute_function_attributes do.
reject_window_function
A window function, which PostgreSQL creates where every other check passes and which this engine cannot run.
validate_body_form
The body interpret_AS_clause accepts: exactly one of an AS body and a SQL-standard body, a SQL-standard body only for SQL, and one AS item for the languages here.
validate_cost
COST must be positive, which PostgreSQL checks of the value it stores in a float4.
validate_parallel
The PARALLEL value interpret_func_parallel accepts.
validate_routine_language
The language CreateFunction looks up: a routine without one reports no language specified, and only SQL and PL/pgSQL exist.
validate_rows
ROWS must be positive, which PostgreSQL checks of the value it stores in a float4.
validate_rows_applicability
ROWS is not applicable when function does not return a set.
validate_transforms
The transforms of TRANSFORM FOR TYPE, which CreateFunction looks up for the routine’s language after it checks LEAKPROOF: each type must exist, and the first reports that no transform exists for its element type, since no transform exists for any type.