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_attributeandcompute_function_attributesdo. - reject_
window_ function - A window function, which
PostgreSQLcreates where every other check passes and which this engine cannot run. - validate_
body_ form - The body
interpret_AS_clauseaccepts: 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, whichPostgreSQLchecks of the value it stores in afloat4.- validate_
parallel - The PARALLEL value
interpret_func_parallelaccepts. - validate_
routine_ language - The language
CreateFunctionlooks up: a routine without one reportsno language specified, and only SQL and PL/pgSQL exist. - validate_
rows ROWS must be positive, whichPostgreSQLchecks of the value it stores in afloat4.- validate_
rows_ applicability ROWS is not applicable when function does not return a set.- validate_
transforms - The transforms of
TRANSFORM FOR TYPE, whichCreateFunctionlooks 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.