pg_proc

A system catalogue table which stores information about functions, procedures, aggregate functions, and window functions

pg_proc is a system catalogue table which stores information about functions, procedures (from PostgreSQL 11), aggregate functions, and window functions.

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 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 documentation: pg_proc

Categories

System catalogue