Home Explore Blog CI



postgresql

72th chunk of `doc/src/sgml/catalogs.sgml`
a2806f6745ed833c7e3d0b033a72ed86ca8daea6e1c6c36e0000000100000faa
 whose results might change at any time.  (Use <literal>v</literal> also
       for functions with side-effects, so that calls to them cannot get
       optimized away.)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>proparallel</structfield> <type>char</type>
      </para>
      <para>
       <structfield>proparallel</structfield> tells whether the function
       can be safely run in parallel mode.
       It is <literal>s</literal> for functions which are safe to run in
       parallel mode without restriction.
       It is <literal>r</literal> for functions which can be run in parallel
       mode, but their execution is restricted to the parallel group leader;
       parallel worker processes cannot invoke these functions.
       It is <literal>u</literal> for functions which are unsafe in parallel
       mode; the presence of such a function forces a serial execution plan.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>pronargs</structfield> <type>int2</type>
      </para>
      <para>
       Number of input arguments
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>pronargdefaults</structfield> <type>int2</type>
      </para>
      <para>
       Number of arguments that have defaults
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>prorettype</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-type"><structname>pg_type</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       Data type of the return value
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>proargtypes</structfield> <type>oidvector</type>
       (references <link linkend="catalog-pg-type"><structname>pg_type</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       An array of the data types of the function arguments.  This includes
       only input arguments (including <literal>INOUT</literal> and
       <literal>VARIADIC</literal> arguments), and thus represents
       the call signature of the function.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>proallargtypes</structfield> <type>oid[]</type>
       (references <link linkend="catalog-pg-type"><structname>pg_type</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       An array of the data types of the function arguments.  This includes
       all arguments (including <literal>OUT</literal> and
       <literal>INOUT</literal> arguments); however, if all the
       arguments are <literal>IN</literal> arguments, this field will be null.
       Note that subscripting is 1-based, whereas for historical reasons
       <structfield>proargtypes</structfield> is subscripted from 0.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>proargmodes</structfield> <type>char[]</type>
      </para>
      <para>
       An array of the modes of the function arguments, encoded as
       <literal>i</literal> for <literal>IN</literal> arguments,
       <literal>o</literal> for <literal>OUT</literal> arguments,
       <literal>b</literal> for <literal>INOUT</literal> arguments,
       <literal>v</literal> for <literal>VARIADIC</literal> arguments,
       <literal>t</literal> for <literal>TABLE</literal> arguments.
       If all the arguments are <literal>IN</literal> arguments,
       this field will be null.
       Note that subscripts correspond to positions of
       <structfield>proallargtypes</structfield>

Title: pg_proc Catalog Columns (Continued): Parallel Safety, Argument Counts, and Types
Summary
This section continues detailing the columns of the `pg_proc` catalog. It covers `proparallel` (parallel execution safety: safe, restricted to leader, or unsafe), `pronargs` (number of input arguments), `pronargdefaults` (number of arguments with defaults), `prorettype` (return data type), `proargtypes` (array of input argument data types), `proallargtypes` (array of all argument data types, including OUT/INOUT), and `proargmodes` (array of argument modes like IN, OUT, INOUT, VARIADIC, TABLE).