pg_proc
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. If proiswin is true, there should be a matching row in pg_window.
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.
Table 1. pg_catalog.pg_proc
column |
type |
references |
description |
|---|---|---|---|
|
name |
Name of the function. |
|
|
oid |
pg_namespace.oid |
The OID of the namespace that contains this function. |
|
oid |
pg_authid.oid |
Owner of the function. |
|
oid |
pg_language.oid |
Implementation language or call interface of this function. |
|
boolean |
Function is an aggregate function. |
|
|
boolean |
Function is a security definer (for example, a ‘setuid’ function). |
|
|
boolean |
Function returns NULL if any call argument is NULL. In that case the function will not actually be called at all. Functions that are not strict must be prepared to handle NULL inputs. |
|
|
boolean |
Function returns a set (multiple values of the specified data type). |
|
|
char |
Tells whether the function’s result depends only on its input arguments, or is affected by outside factors. |
|
|
smallint |
Number of arguments. |
|
|
oid |
pg_type.oid |
Data type of the return value. |
|
boolean |
Function is neither an aggregate nor a scalar function, but a pure window function. |
|
|
oidvector |
pg_type.oid |
An array with the data types of the function arguments. This includes only input arguments (including |
|
oid[] |
pg_type.oid |
An array with the data types of the function arguments. This includes all arguments (including |
|
char[] |
An array with the modes of the function arguments: |
|
|
text[] |
An array with the names of the function arguments. Arguments without a name are set to empty strings in the array. If none of the arguments have a name, this field will be null. Note that subscripts correspond to positions of proallargtypes not proargtypes. |
|
|
text |
This tells the function handler how to invoke the function. It might be the actual source code of the function for interpreted languages, a link symbol, a file name, or just about anything else, depending on the implementation language/call convention. |
|
|
bytea |
Additional information about how to invoke the function. Again, the interpretation is language-specific. |
|
|
aclitem[] |
Access privileges for the function as given by |
|
|
char |