Functions

SQL and PL/pgSQL functions, function attributes, procedures, and aggregate functions.
PageDescription
SQL & PL/pgSQLFunction declarations in all languages
AttributesVOLATILE, STABLE, IMMUTABLE, STRICT, SECURITY DEFINER, PARALLEL, and more
ProceduresPROCEDURE declarations with COMMIT support
AggregatesAGGREGATE with SFUNC, STYPE, FINALFUNC, and ordered-set variants

SQL & PL/pgSQL Functions

Function declarations in all languages: simple SQL, PL/pgSQL, set-returning, variadic, trigger, and named dollar-quoting.

Function Attributes

Volatility, strictness, security, parallelism, cost, rows, support, SET, and WINDOW attributes.

Procedures

PROCEDURE declarations; procedures may COMMIT mid-execution.

Aggregates

AGGREGATE declarations with SFUNC, STYPE, INITCOND, FINALFUNC, and ordered-set variants.