pg_proc
The pg_proc system catalog table stores information about functions (or procedures), both built-in functions and those defined by CREATE FUNCTION. The table contains data for aggregate and window functions as well as plain functions. If proisagg is true, there should be a matching row in pg_aggregate.
For compiled functions, both built-in and dynamically loaded, prosrc contains the function's C-language name (link symbol). For all other currently-known language types, prosrc contains the function's source text. probin is unused except for dynamically-loaded C functions, for which it gives the name of the shared library file containing the function.
| column | type | references | description |
|---|---|---|---|
oid | oid | Row identifier (hidden attribute; must be explicitly selected). | |
proname | name | Name of the function. | |
pronamespace | oid | pg_namespace.oid | The OID of the namespace that contains this function. |
proowner | oid | pg_authid.oid | Owner of the function. |
prolang | oid | pg_language.oid | Implementation language or call interface of this function. |
procost | real | Estimated execution cost (in cpu_operator_cost units); if proretset is true, identifies the cost per row returned. | |
prorows | real | Estimated number of result rows (zero if not proretset). | |
provariadic | oid | pg_type.oid | Data type of the variadic array parameter's elements, or zero if the function does not have a variadic parameter. |
prosupport | regproc | pg_proc.oid | Planner support function for this function |
prokind | char | f for a normal function, p for a procedure, a for an aggregate function, or w for a window function | |
prosecdef | boolean |