Home Explore Blog CI



postgresql

4th chunk of `doc/src/sgml/ref/alter_function.sgml`
6d89a0e9217b4f8b5aaa6ad975bb810b0dec70f0c2a1ab1100000001000009fb
 information about
      this capability.
     </para>
    </listitem>
   </varlistentry>

    <varlistentry>
     <term><literal>COST</literal> <replaceable class="parameter">execution_cost</replaceable></term>

     <listitem>
      <para>
       Change the estimated execution cost of the function.
       See <xref linkend="sql-createfunction"/> for more information.
      </para>
     </listitem>
   </varlistentry>

    <varlistentry>
     <term><literal>ROWS</literal> <replaceable class="parameter">result_rows</replaceable></term>

     <listitem>
      <para>
       Change the estimated number of rows returned by a set-returning
       function.  See <xref linkend="sql-createfunction"/> for more information.
      </para>
     </listitem>
   </varlistentry>

   <varlistentry>
    <term><literal>SUPPORT</literal> <replaceable class="parameter">support_function</replaceable></term>

    <listitem>
     <para>
      Set or change the planner support function to use for this function.
      See <xref linkend="xfunc-optimization"/> for details.  You must be
      superuser to use this option.
     </para>

     <para>
      This option cannot be used to remove the support function altogether,
      since it must name a new support function.  Use <command>CREATE OR
      REPLACE FUNCTION</command> if you need to do that.
     </para>
    </listitem>
   </varlistentry>

     <varlistentry>
      <term><replaceable>configuration_parameter</replaceable></term>
      <term><replaceable>value</replaceable></term>
      <listitem>
       <para>
        Add or change the assignment to be made to a configuration parameter
        when the function is called.  If
        <replaceable>value</replaceable> is <literal>DEFAULT</literal>
        or, equivalently, <literal>RESET</literal> is used, the function-local
        setting is removed, so that the function executes with the value
        present in its environment.  Use <literal>RESET
        ALL</literal> to clear all function-local settings.
        <literal>SET FROM CURRENT</literal> saves the value of the parameter that
        is current when <command>ALTER FUNCTION</command> is executed as the value
        to be applied when the function is entered.
       </para>

       <para>
        See <xref linkend="sql-set"/> and
        <xref linkend="runtime-config"/>
        for more information about allowed parameter names and values.
       </para>
      </listitem>
     </varlistentry>

   <varlistentry>
    <term><literal>RESTRICT</literal></term>

    <listitem>

Title: ALTER FUNCTION - Parameters: Security, Cost, Rows, Support, Configuration
Summary
This section describes the parameters for modifying a function using the `ALTER FUNCTION` command, covering: setting security context (`SECURITY INVOKER`/`SECURITY DEFINER`), adjusting the estimated execution cost (`COST`), modifying the estimated number of returned rows for set-returning functions (`ROWS`), setting or changing the planner support function (`SUPPORT`), and managing function-specific configuration parameters with `SET` and `RESET` options. The section specifies the requirements to be a superuser to set or change the support function.