Home Explore Blog CI



postgresql

5th chunk of `doc/src/sgml/ref/alter_extension.sgml`
c6a8e0f610bb0fcb6bfe314812ab37b081f5bf9d9ff1cbe90000000100000c2e
 pay
       any attention to <literal>OUT</literal> arguments, since only the input
       arguments are needed to determine the function's identity.
       So it is sufficient to list the <literal>IN</literal>, <literal>INOUT</literal>,
       and <literal>VARIADIC</literal> arguments.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><replaceable class="parameter">argname</replaceable></term>

     <listitem>
      <para>
       The name of a function, procedure, or aggregate argument.
       Note that <command>ALTER EXTENSION</command> does not actually pay
       any attention to argument names, since only the argument data
       types are needed to determine the function's identity.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><replaceable class="parameter">argtype</replaceable></term>

     <listitem>
      <para>
       The data type of a function, procedure, or aggregate argument.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><replaceable class="parameter">left_type</replaceable></term>
     <term><replaceable class="parameter">right_type</replaceable></term>
     <listitem>
      <para>
       The data type(s) of the operator's arguments (optionally
       schema-qualified).  Write <literal>NONE</literal> for the missing argument
       of a prefix operator.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><literal>PROCEDURAL</literal></term>

     <listitem>
      <para>
       This is a noise word.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><replaceable>type_name</replaceable></term>

     <listitem>
      <para>
       The name of the data type of the transform.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><replaceable>lang_name</replaceable></term>

     <listitem>
      <para>
       The name of the language of the transform.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>

 <refsect1>
  <title>Examples</title>

  <para>
   To update the <literal>hstore</literal> extension to version 2.0:
<programlisting>
ALTER EXTENSION hstore UPDATE TO '2.0';
</programlisting>
  </para>

  <para>
   To change the schema of the <literal>hstore</literal> extension
   to <literal>utils</literal>:
<programlisting>
ALTER EXTENSION hstore SET SCHEMA utils;
</programlisting>
  </para>

  <para>
   To add an existing function to the <literal>hstore</literal> extension:
<programlisting>
ALTER EXTENSION hstore ADD FUNCTION populate_record(anyelement, hstore);
</programlisting></para>
 </refsect1>

 <refsect1>
  <title>Compatibility</title>

  <para>
   <command>ALTER EXTENSION</command> is a <productname>PostgreSQL</productname>
   extension.
  </para>
 </refsect1>

 <refsect1 id="sql-alterextension-see-also">
  <title>See Also</title>

  <simplelist type="inline">
   <member><xref linkend="sql-createextension"/></member>
   <member><xref linkend="sql-dropextension"/></member>
  </simplelist>
 </refsect1>
</refentry>

Title: ALTER EXTENSION Parameters (Continued) and Examples
Summary
This section continues describing parameters for `ALTER EXTENSION`, covering `left_type`/`right_type` for operator arguments, the noise word `PROCEDURAL`, `type_name` for transform data types, and `lang_name` for transform languages. Following the parameter descriptions, the section provides examples of updating an extension, changing its schema, and adding a function to an extension. It concludes with compatibility information and a 'See Also' section linking to CREATE EXTENSION and DROP EXTENSION.