3.15. pg_proc

This catalog stores information about functions (or procedures). The description of CREATE FUNCTION and the Programmer's Guide contain more information about the meaning of some fields.

Table 3-15. pg_proc Columns

NameTypeReferencesDescription
pronamename Name of the function
proownerint4pg_shadow.usesysidOwner (creator) of the function
prolangoidpg_language.oidImplementation language or call interface of this function
proisinhbool unused
proistrustedbool not functional
proiscachablebool Function returns same result for same input values
proisstrictbool  Function returns null if any call argument is null. In that case the function won't actually be called at all. Functions that are not "strict" must be prepared to handle null inputs.
pronargsint2 Number of arguments
proretsetbool Function returns a set (ie, multiple values of the specified datatype)
prorettypeoidpg_type.oidData type of the return value (0 if the function does not return a value)
proargtypesoidvectorpg_type.oidA vector with the data types of the function arguments
probyte_pctint4 dead code
properbyte_cpuint4 dead code
propercall_cpuint4 dead code
prooutin_ratioint4 dead code
prosrctext  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.
probinbytea Additional information about how to invoke the function. Again, the interpretation is language-specific.

Currently, prosrc contains the function's C-language name (link symbol) for compiled functions, both built-in and dynamically loaded. For all other language types, prosrc contains the function's source text.

Currently, probin is unused except for dynamically-loaded C functions, for which it gives the name of the shared library file containing the function.