pg_proc
pg_proc
is a system catalogue table which stores information about functions, procedures (from PostgreSQL 11), aggregate functions, and window functions.
pg_proc
has always been present in PostgreSQL.
Source code
Between PostgreSQL 8.4 (commit 039dfbfd) and PostgreSQL 11 (commit cefa3871), an additional source file src/include/catalog/pg_proc_fn.h existed to enable catalogue definitions to be included by frontend code.
Definition by PostgreSQL version
pg_proc (PostgreSQL 14)
Table "pg_catalog.pg_proc" Column | Type | Collation | Nullable | Default -----------------+--------------+-----------+----------+--------- oid | oid | | not null | proname | name | | not null | pronamespace | oid | | not null | proowner | oid | | not null | prolang | oid | | not null | procost | real | | not null | prorows | real | | not null | provariadic | oid | | not null | prosupport | regproc | | not null | prokind | "char" | | not null | prosecdef | boolean | | not null | proleakproof | boolean | | not null | proisstrict | boolean | | not null | proretset | boolean | | not null | provolatile | "char" | | not null | proparallel | "char" | | not null | pronargs | smallint | | not null | pronargdefaults | smallint | | not null | prorettype | oid | | not null | proargtypes | oidvector | | not null | proallargtypes | oid[] | | | proargmodes | "char"[] | | | proargnames | text[] | C | | proargdefaults | pg_node_tree | C | | protrftypes | oid[] | | | prosrc | text | C | not null | probin | text | C | | proconfig | text[] | C | | proacl | aclitem[] | | | Indexes: "pg_proc_oid_index" PRIMARY KEY, btree (oid) "pg_proc_proname_args_nsp_index" UNIQUE CONSTRAINT, btree (proname, proargtypes, pronamespace)
Documentation: pg_proc
pg_proc (PostgreSQL 13)
Table "pg_catalog.pg_proc" Column | Type | Collation | Nullable | Default -----------------+--------------+-----------+----------+--------- oid | oid | | not null | proname | name | | not null | pronamespace | oid | | not null | proowner | oid | | not null | prolang | oid | | not null | procost | real | | not null | prorows | real | | not null | provariadic | oid | | not null | prosupport | regproc | | not null | prokind | "char" | | not null | prosecdef | boolean | | not null | proleakproof | boolean | | not null | proisstrict | boolean | | not null | proretset | boolean | | not null | provolatile | "char" | | not null | proparallel | "char" | | not null | pronargs | smallint | | not null | pronargdefaults | smallint | | not null | prorettype | oid | | not null | proargtypes | oidvector | | not null | proallargtypes | oid[] | | | proargmodes | "char"[] | | | proargnames | text[] | C | | proargdefaults | pg_node_tree | C | | protrftypes | oid[] | | | prosrc | text | C | not null | probin | text | C | | proconfig | text[] | C | | proacl | aclitem[] | | | Indexes: "pg_proc_oid_index" UNIQUE, btree (oid) "pg_proc_proname_args_nsp_index" UNIQUE, btree (proname, proargtypes, pronamespace)
Documentation: pg_proc
pg_proc (PostgreSQL 12)
Table "pg_catalog.pg_proc" Column | Type | Collation | Nullable | Default -----------------+--------------+-----------+----------+--------- oid | oid | | not null | proname | name | | not null | pronamespace | oid | | not null | proowner | oid | | not null | prolang | oid | | not null | procost | real | | not null | prorows | real | | not null | provariadic | oid | | not null | prosupport | regproc | | not null | prokind | "char" | | not null | prosecdef | boolean | | not null | proleakproof | boolean | | not null | proisstrict | boolean | | not null | proretset | boolean | | not null | provolatile | "char" | | not null | proparallel | "char" | | not null | pronargs | smallint | | not null | pronargdefaults | smallint | | not null | prorettype | oid | | not null | proargtypes | oidvector | | not null | proallargtypes | oid[] | | | proargmodes | "char"[] | | | proargnames | text[] | C | | proargdefaults | pg_node_tree | C | | protrftypes | oid[] | | | prosrc | text | C | not null | probin | text | C | | proconfig | text[] | C | | proacl | aclitem[] | | | Indexes: "pg_proc_oid_index" UNIQUE, btree (oid) "pg_proc_proname_args_nsp_index" UNIQUE, btree (proname, proargtypes, pronamespace)
Documentation: pg_proc
pg_proc (PostgreSQL 11)
Table "pg_catalog.pg_proc" Column | Type | Collation | Nullable | Default -----------------+--------------+-----------+----------+--------- proname | name | | not null | pronamespace | oid | | not null | proowner | oid | | not null | prolang | oid | | not null | procost | real | | not null | prorows | real | | not null | provariadic | oid | | not null | protransform | regproc | | not null | prokind | "char" | | not null | prosecdef | boolean | | not null | proleakproof | boolean | | not null | proisstrict | boolean | | not null | proretset | boolean | | not null | provolatile | "char" | | not null | proparallel | "char" | | not null | pronargs | smallint | | not null | pronargdefaults | smallint | | not null | prorettype | oid | | not null | proargtypes | oidvector | | not null | proallargtypes | oid[] | | | proargmodes | "char"[] | | | proargnames | text[] | | | proargdefaults | pg_node_tree | | | protrftypes | oid[] | | | prosrc | text | | not null | probin | text | | | proconfig | text[] | | | proacl | aclitem[] | | | Indexes: "pg_proc_oid_index" UNIQUE, btree (oid) "pg_proc_proname_args_nsp_index" UNIQUE, btree (proname, proargtypes, pronamespace)
Documentation: pg_proc
pg_proc (PostgreSQL 10)
Table "pg_catalog.pg_proc" Column | Type | Collation | Nullable | Default -----------------+--------------+-----------+----------+--------- proname | name | | not null | pronamespace | oid | | not null | proowner | oid | | not null | prolang | oid | | not null | procost | real | | not null | prorows | real | | not null | provariadic | oid | | not null | protransform | regproc | | not null | proisagg | boolean | | not null | proiswindow | boolean | | not null | prosecdef | boolean | | not null | proleakproof | boolean | | not null | proisstrict | boolean | | not null | proretset | boolean | | not null | provolatile | "char" | | not null | proparallel | "char" | | not null | pronargs | smallint | | not null | pronargdefaults | smallint | | not null | prorettype | oid | | not null | proargtypes | oidvector | | not null | proallargtypes | oid[] | | | proargmodes | "char"[] | | | proargnames | text[] | | | proargdefaults | pg_node_tree | | | protrftypes | oid[] | | | prosrc | text | | not null | probin | text | | | proconfig | text[] | | | proacl | aclitem[] | | | Indexes: "pg_proc_oid_index" UNIQUE, btree (oid) "pg_proc_proname_args_nsp_index" UNIQUE, btree (proname, proargtypes, pronamespace)
Documentation: pg_proc
pg_proc (PostgreSQL 9.6)
Table "pg_catalog.pg_proc" Column | Type | Modifiers -----------------+--------------+----------- proname | name | not null pronamespace | oid | not null proowner | oid | not null prolang | oid | not null procost | real | not null prorows | real | not null provariadic | oid | not null protransform | regproc | not null proisagg | boolean | not null proiswindow | boolean | not null prosecdef | boolean | not null proleakproof | boolean | not null proisstrict | boolean | not null proretset | boolean | not null provolatile | "char" | not null proparallel | "char" | not null pronargs | smallint | not null pronargdefaults | smallint | not null prorettype | oid | not null proargtypes | oidvector | not null proallargtypes | oid[] | proargmodes | "char"[] | proargnames | text[] | proargdefaults | pg_node_tree | protrftypes | oid[] | prosrc | text | not null probin | text | proconfig | text[] | proacl | aclitem[] | Indexes: "pg_proc_oid_index" UNIQUE, btree (oid) "pg_proc_proname_args_nsp_index" UNIQUE, btree (proname, proargtypes, pronamespace)
Documentation: pg_proc
pg_proc (PostgreSQL 9.5)
Table "pg_catalog.pg_proc" Column | Type | Modifiers -----------------+--------------+----------- proname | name | not null pronamespace | oid | not null proowner | oid | not null prolang | oid | not null procost | real | not null prorows | real | not null provariadic | oid | not null protransform | regproc | not null proisagg | boolean | not null proiswindow | boolean | not null prosecdef | boolean | not null proleakproof | boolean | not null proisstrict | boolean | not null proretset | boolean | not null provolatile | "char" | not null pronargs | smallint | not null pronargdefaults | smallint | not null prorettype | oid | not null proargtypes | oidvector | not null proallargtypes | oid[] | proargmodes | "char"[] | proargnames | text[] | proargdefaults | pg_node_tree | protrftypes | oid[] | prosrc | text | not null probin | text | proconfig | text[] | proacl | aclitem[] | Indexes: "pg_proc_oid_index" UNIQUE, btree (oid) "pg_proc_proname_args_nsp_index" UNIQUE, btree (proname, proargtypes, pronamespace)
Documentation: pg_proc
pg_proc (PostgreSQL 9.4)
Table "pg_catalog.pg_proc" Column | Type | Modifiers -----------------+--------------+----------- proname | name | not null pronamespace | oid | not null proowner | oid | not null prolang | oid | not null procost | real | not null prorows | real | not null provariadic | oid | not null protransform | regproc | not null proisagg | boolean | not null proiswindow | boolean | not null prosecdef | boolean | not null proleakproof | boolean | not null proisstrict | boolean | not null proretset | boolean | not null provolatile | "char" | not null pronargs | smallint | not null pronargdefaults | smallint | not null prorettype | oid | not null proargtypes | oidvector | not null proallargtypes | oid[] | proargmodes | "char"[] | proargnames | text[] | proargdefaults | pg_node_tree | prosrc | text | probin | text | proconfig | text[] | proacl | aclitem[] | Indexes: "pg_proc_oid_index" UNIQUE, btree (oid) "pg_proc_proname_args_nsp_index" UNIQUE, btree (proname, proargtypes, pronamespace)
Documentation: pg_proc
pg_proc (PostgreSQL 9.3)
Table "pg_catalog.pg_proc" Column | Type | Modifiers -----------------+--------------+----------- proname | name | not null pronamespace | oid | not null proowner | oid | not null prolang | oid | not null procost | real | not null prorows | real | not null provariadic | oid | not null protransform | regproc | not null proisagg | boolean | not null proiswindow | boolean | not null prosecdef | boolean | not null proleakproof | boolean | not null proisstrict | boolean | not null proretset | boolean | not null provolatile | "char" | not null pronargs | smallint | not null pronargdefaults | smallint | not null prorettype | oid | not null proargtypes | oidvector | not null proallargtypes | oid[] | proargmodes | "char"[] | proargnames | text[] | proargdefaults | pg_node_tree | prosrc | text | probin | text | proconfig | text[] | proacl | aclitem[] | Indexes: "pg_proc_oid_index" UNIQUE, btree (oid) "pg_proc_proname_args_nsp_index" UNIQUE, btree (proname, proargtypes, pronamespace)
Documentation: pg_proc
pg_proc (PostgreSQL 9.2)
Table "pg_catalog.pg_proc" Column | Type | Modifiers -----------------+--------------+----------- proname | name | not null pronamespace | oid | not null proowner | oid | not null prolang | oid | not null procost | real | not null prorows | real | not null provariadic | oid | not null protransform | regproc | not null proisagg | boolean | not null proiswindow | boolean | not null prosecdef | boolean | not null proleakproof | boolean | not null proisstrict | boolean | not null proretset | boolean | not null provolatile | "char" | not null pronargs | smallint | not null pronargdefaults | smallint | not null prorettype | oid | not null proargtypes | oidvector | not null proallargtypes | oid[] | proargmodes | "char"[] | proargnames | text[] | proargdefaults | pg_node_tree | prosrc | text | probin | text | proconfig | text[] | proacl | aclitem[] | Indexes: "pg_proc_oid_index" UNIQUE, btree (oid) "pg_proc_proname_args_nsp_index" UNIQUE, btree (proname, proargtypes, pronamespace)
Documentation: pg_proc
pg_proc (PostgreSQL 9.1)
Table "pg_catalog.pg_proc" Column | Type | Modifiers -----------------+--------------+----------- proname | name | not null pronamespace | oid | not null proowner | oid | not null prolang | oid | not null procost | real | not null prorows | real | not null provariadic | oid | not null proisagg | boolean | not null proiswindow | boolean | not null prosecdef | boolean | not null proisstrict | boolean | not null proretset | boolean | not null provolatile | "char" | not null pronargs | smallint | not null pronargdefaults | smallint | not null prorettype | oid | not null proargtypes | oidvector | not null proallargtypes | oid[] | proargmodes | "char"[] | proargnames | text[] | proargdefaults | pg_node_tree | prosrc | text | probin | text | proconfig | text[] | proacl | aclitem[] | Indexes: "pg_proc_oid_index" UNIQUE, btree (oid) "pg_proc_proname_args_nsp_index" UNIQUE, btree (proname, proargtypes, pronamespace)
Documentation: pg_proc
pg_proc (PostgreSQL 9.0)
Table "pg_catalog.pg_proc" Column | Type | Modifiers -----------------+-----------+----------- proname | name | not null pronamespace | oid | not null proowner | oid | not null prolang | oid | not null procost | real | not null prorows | real | not null provariadic | oid | not null proisagg | boolean | not null proiswindow | boolean | not null prosecdef | boolean | not null proisstrict | boolean | not null proretset | boolean | not null provolatile | "char" | not null pronargs | smallint | not null pronargdefaults | smallint | not null prorettype | oid | not null proargtypes | oidvector | not null proallargtypes | oid[] | proargmodes | "char"[] | proargnames | text[] | proargdefaults | text | prosrc | text | probin | text | proconfig | text[] | proacl | aclitem[] | Indexes: "pg_proc_oid_index" UNIQUE, btree (oid) "pg_proc_proname_args_nsp_index" UNIQUE, btree (proname, proargtypes, pronamespace)
Documentation: pg_proc
pg_proc (PostgreSQL 8.4)
Table "pg_catalog.pg_proc" Column | Type | Modifiers -----------------+-----------+----------- proname | name | not null pronamespace | oid | not null proowner | oid | not null prolang | oid | not null procost | real | not null prorows | real | not null provariadic | oid | not null proisagg | boolean | not null proiswindow | boolean | not null prosecdef | boolean | not null proisstrict | boolean | not null proretset | boolean | not null provolatile | "char" | not null pronargs | smallint | not null pronargdefaults | smallint | not null prorettype | oid | not null proargtypes | oidvector | not null proallargtypes | oid[] | proargmodes | "char"[] | proargnames | text[] | proargdefaults | text | prosrc | text | probin | bytea | proconfig | text[] | proacl | aclitem[] | Indexes: "pg_proc_oid_index" UNIQUE, btree (oid) "pg_proc_proname_args_nsp_index" UNIQUE, btree (proname, proargtypes, pronamespace)
Documentation: pg_proc
pg_proc (PostgreSQL 8.3)
Table "pg_catalog.pg_proc" Column | Type | Modifiers ----------------+-----------+----------- proname | name | not null pronamespace | oid | not null proowner | oid | not null prolang | oid | not null procost | real | not null prorows | real | not null proisagg | boolean | not null prosecdef | boolean | not null proisstrict | boolean | not null proretset | boolean | not null provolatile | "char" | not null pronargs | smallint | not null prorettype | oid | not null proargtypes | oidvector | not null proallargtypes | oid[] | proargmodes | "char"[] | proargnames | text[] | prosrc | text | probin | bytea | proconfig | text[] | proacl | aclitem[] | Indexes: "pg_proc_oid_index" UNIQUE, btree (oid) "pg_proc_proname_args_nsp_index" UNIQUE, btree (proname, proargtypes, pronamespace)
Documentation: pg_proc
pg_proc (PostgreSQL 8.2)
Table "pg_catalog.pg_proc" Column | Type | Modifiers ----------------+-----------+----------- proname | name | not null pronamespace | oid | not null proowner | oid | not null prolang | oid | not null proisagg | boolean | not null prosecdef | boolean | not null proisstrict | boolean | not null proretset | boolean | not null provolatile | "char" | not null pronargs | smallint | not null prorettype | oid | not null proargtypes | oidvector | not null proallargtypes | oid[] | proargmodes | "char"[] | proargnames | text[] | prosrc | text | probin | bytea | proacl | aclitem[] | Indexes: "pg_proc_oid_index" UNIQUE, btree (oid) "pg_proc_proname_args_nsp_index" UNIQUE, btree (proname, proargtypes, pronamespace)
Documentation: pg_proc
Change history
Note: may not show all changes prior to PostgreSQL 8.4.
- PostgreSQL 12
- column
protransform
renamed toprosupport
(commit 74dfe58a)
- column
- PostgreSQL 11
- columns
proisagg
andproiswindow
replaced byprokind
(commit fd1a421f)
- columns
- PostgreSQL 9.6
- column
proparallel
added (commit 7aea8e4f)
- column
- PostgreSQL 9.5
- column
protrftypes
added (commit cac76582)
- column
- PostgreSQL 9.2
- PostgreSQL 9.1
- column
proargdefaults
changed to typepg_node_tree
(commit 303696c3)
- column
- PostgreSQL 8.4
- PostgreSQL 7.3
- following columns removed (commit 739adf32):
proimplicit
probyte_pct
properbyte_cpu
propercall_cpu
prooutin_ratio
- following columns removed (commit 739adf32):
References
- PostgreSQL documentation: pg_proc