head	1.19;
access;
symbols
	REL9_0_0:1.19
	REL9_1_ALPHA1:1.19
	REL9_0_RC1:1.19
	REL9_0_BETA4:1.19
	REL9_0_STABLE:1.19.0.2
	REL9_0_BETA3:1.19
	REL9_0_BETA2:1.19
	REL7_4_29:1.3
	REL8_0_25:1.5
	REL8_1_21:1.10
	REL8_2_17:1.12
	REL8_3_11:1.15
	REL8_4_4:1.17
	REL9_0_BETA1:1.19
	REL9_0_ALPHA5_BRANCH:1.18.0.8
	REL9_0_ALPHA5:1.18
	REL7_4_28:1.3
	REL8_0_24:1.5
	REL8_1_20:1.10
	REL8_2_16:1.12
	REL8_3_10:1.15
	REL8_4_3:1.17
	REL9_0_ALPHA4:1.18
	REL9_0_ALPHA4_BRANCH:1.18.0.6
	REL8_5_ALPHA3:1.18
	REL8_5_ALPHA3_BRANCH:1.18.0.4
	REL7_4_27:1.3
	REL8_0_23:1.5
	REL8_1_19:1.10
	REL8_2_15:1.12
	REL8_3_9:1.15
	REL8_4_2:1.17
	REL8_5_ALPHA2:1.18
	REL8_5_ALPHA2_BRANCH:1.18.0.2
	REL7_4_26:1.3
	REL8_0_22:1.5
	REL8_1_18:1.10
	REL8_2_14:1.12
	REL8_3_8:1.15
	REL8_4_1:1.17
	REL8_5_ALPHA1:1.17
	REL8_5_ALPHA1_BRANCH:1.17.0.4
	REL8_4_STABLE:1.17.0.2
	REL8_4_0:1.17
	REL8_4_RC2:1.17
	REL8_4_RC1:1.17
	REL8_4_BETA2:1.17
	REL8_4_BETA1:1.17
	REL7_4_25:1.3
	REL8_0_21:1.5
	REL8_1_17:1.10
	REL8_2_13:1.12
	REL8_3_7:1.15
	REL7_4_24:1.3
	REL8_0_20:1.5
	REL8_1_16:1.10
	REL8_2_12:1.12
	REL8_3_6:1.15
	REL7_4_23:1.3
	REL8_0_19:1.5
	REL8_1_15:1.10
	REL8_2_11:1.12
	REL8_3_5:1.15
	REL7_4_22:1.3
	REL8_0_18:1.5
	REL8_1_14:1.10
	REL8_2_10:1.12
	REL8_3_4:1.15
	REL7_4_21:1.3
	REL8_0_17:1.5
	REL8_1_13:1.10
	REL8_2_9:1.12
	REL8_3_3:1.15
	REL7_4_20:1.3
	REL8_0_16:1.5
	REL8_1_12:1.10
	REL8_2_8:1.12
	REL8_3_2:1.15
	REL8_2_7:1.12
	REL8_3_1:1.15
	REL8_3_STABLE:1.15.0.2
	REL8_3_0:1.15
	REL8_3_RC2:1.15
	REL7_4_19:1.3
	REL8_0_15:1.5
	REL8_1_11:1.10
	REL8_2_6:1.12
	REL8_3_RC1:1.15
	REL8_3_BETA4:1.15
	REL8_3_BETA3:1.15
	REL8_3_BETA2:1.15
	REL8_3_BETA1:1.15
	REL7_4_18:1.3
	REL8_0_14:1.5
	REL8_1_10:1.10
	REL8_2_5:1.12
	REL7_4_17:1.3
	REL8_0_13:1.5
	REL8_1_9:1.10
	REL8_2_4:1.12
	REL8_0_12:1.5
	REL8_1_8:1.10
	REL8_2_3:1.12
	REL7_4_16:1.3
	REL8_0_11:1.5
	REL8_1_7:1.10
	REL8_2_2:1.12
	REL8_0_10:1.5
	REL8_1_6:1.10
	REL8_2_1:1.12
	REL7_4_15:1.3
	REL8_2_STABLE:1.12.0.2
	REL8_2_0:1.12
	REL8_2_RC1:1.12
	REL8_2_BETA3:1.12
	REL8_2_BETA2:1.12
	REL8_1_5:1.10
	REL8_0_9:1.5
	REL7_4_14:1.3
	REL8_2_BETA1:1.12
	REL7_4_13:1.3
	REL8_0_8:1.5
	REL8_1_4:1.10
	REL7_4_12:1.3
	REL8_0_7:1.5
	REL8_1_3:1.10
	REL7_4_11:1.3
	REL8_0_6:1.5
	REL8_1_2:1.10
	REL7_4_10:1.3
	REL8_0_5:1.5
	REL8_1_1:1.10
	REL8_1_STABLE:1.10.0.2
	REL8_1_0:1.10
	REL8_1_0RC1:1.9
	REL8_1_0BETA4:1.9
	REL8_1_0BETA3:1.8
	REL7_4_9:1.3
	REL8_0_4:1.5
	REL8_1_0BETA2:1.8
	REL8_1_0BETA1:1.8
	REL7_4_8:1.3
	REL8_0_3:1.5
	REL8_0_2:1.5
	REL7_4_7:1.3
	REL8_0_1:1.5
	REL8_0_STABLE:1.5.0.4
	REL8_0_0:1.5.0.2
	REL8_0_0RC5:1.5
	REL8_0_0RC4:1.5
	REL8_0_0RC3:1.5
	REL8_0_0RC2:1.5
	REL8_0_0RC1:1.5
	REL8_0_0BETA5:1.5
	REL8_0_0BETA4:1.5
	REL7_4_6:1.3
	REL8_0_0BETA3:1.5
	REL8_0_0BETA2:1.5
	REL7_4_5:1.3
	REL7_4_4:1.3
	REL8_0_0BETA1:1.5
	REL7_4_3:1.3
	REL7_4_2:1.3
	REL7_4_1:1.3
	REL7_4:1.3
	REL7_4_RC2:1.3
	REL7_4_STABLE:1.3.0.2
	REL7_4_RC1:1.3
	REL7_4_BETA5:1.3
	REL7_4_BETA4:1.3
	REL7_4_BETA3:1.3
	REL7_4_BETA2:1.1
	WIN32_DEV:1.1.0.2
	REL7_4_BETA1:1.1;
locks; strict;
comment	@# @;


1.19
date	2010.04.03.07.22.56;	author petere;	state Exp;
branches;
next	1.18;

1.18
date	2009.09.18.05.00.41;	author petere;	state Exp;
branches;
next	1.17;

1.17
date	2008.11.14.10.22.45;	author petere;	state Exp;
branches;
next	1.16;

1.16
date	2008.07.16.01.30.21;	author tgl;	state Exp;
branches;
next	1.15;

1.15
date	2007.09.03.18.46.29;	author tgl;	state Exp;
branches;
next	1.14;

1.14
date	2007.09.03.00.39.12;	author tgl;	state Exp;
branches;
next	1.13;

1.13
date	2007.01.22.01.35.19;	author tgl;	state Exp;
branches;
next	1.12;

1.12
date	2006.09.16.00.30.16;	author momjian;	state Exp;
branches;
next	1.11;

1.11
date	2006.02.18.23.14.45;	author neilc;	state Exp;
branches;
next	1.10;

1.10
date	2005.11.01.21.09.50;	author tgl;	state Exp;
branches;
next	1.9;

1.9
date	2005.10.13.22.44.51;	author tgl;	state Exp;
branches;
next	1.8;

1.8
date	2005.08.01.16.11.14;	author tgl;	state Exp;
branches;
next	1.7;

1.7
date	2005.05.26.20.05.03;	author tgl;	state Exp;
branches;
next	1.6;

1.6
date	2005.03.14.00.19.36;	author neilc;	state Exp;
branches;
next	1.5;

1.5
date	2004.06.25.21.55.50;	author tgl;	state Exp;
branches;
next	1.4;

1.4
date	2003.11.29.19.51.38;	author pgsql;	state Exp;
branches;
next	1.3;

1.3
date	2003.09.09.18.28.52;	author tgl;	state Exp;
branches;
next	1.2;

1.2
date	2003.08.31.17.32.21;	author petere;	state Exp;
branches;
next	1.1;

1.1
date	2003.06.27.14.45.25;	author petere;	state Exp;
branches
	1.1.2.1;
next	;

1.1.2.1
date	2003.09.07.04.36.44;	author momjian;	state Exp;
branches;
next	;


desc
@@


1.19
log
@Remove unnecessary xref endterm attributes and title ids

The endterm attribute is mainly useful when the toolchain does not support
automatic link target text generation for a particular situation.  In  the
past, this was required by the man page tools for all reference page links,
but that is no longer the case, and it now actually gets in the way of
proper automatic link text generation.  The only remaining use cases are
currently xrefs to refsects.
@
text
@<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_function.sgml,v 1.18 2009/09/18 05:00:41 petere Exp $
PostgreSQL documentation
-->

<refentry id="SQL-ALTERFUNCTION">
 <refmeta>
  <refentrytitle>ALTER FUNCTION</refentrytitle>
  <manvolnum>7</manvolnum>
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>ALTER FUNCTION</refname>
  <refpurpose>change the definition of a function</refpurpose>
 </refnamediv>  
  
 <indexterm zone="sql-alterfunction">
  <primary>ALTER FUNCTION</primary>
 </indexterm>

 <refsynopsisdiv>
<synopsis>
ALTER FUNCTION <replaceable>name</replaceable> ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] )
    <replaceable class="PARAMETER">action</replaceable> [ ... ] [ RESTRICT ]
ALTER FUNCTION <replaceable>name</replaceable> ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] )
    RENAME TO <replaceable>new_name</replaceable>
ALTER FUNCTION <replaceable>name</replaceable> ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] )
    OWNER TO <replaceable>new_owner</replaceable>
ALTER FUNCTION <replaceable>name</replaceable> ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] )
    SET SCHEMA <replaceable>new_schema</replaceable>

<phrase>where <replaceable class="PARAMETER">action</replaceable> is one of:</phrase>

    CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT | STRICT
    IMMUTABLE | STABLE | VOLATILE
    [ EXTERNAL ] SECURITY INVOKER | [ EXTERNAL ] SECURITY DEFINER
    COST <replaceable class="parameter">execution_cost</replaceable>
    ROWS <replaceable class="parameter">result_rows</replaceable>
    SET <replaceable class="parameter">configuration_parameter</replaceable> { TO | = } { <replaceable class="parameter">value</replaceable> | DEFAULT }
    SET <replaceable class="parameter">configuration_parameter</replaceable> FROM CURRENT
    RESET <replaceable class="parameter">configuration_parameter</replaceable>
    RESET ALL
</synopsis>
 </refsynopsisdiv>
  
 <refsect1>
  <title>Description</title>

  <para>
   <command>ALTER FUNCTION</command> changes the definition of a
   function.
  </para>

  <para>
   You must own the function to use <command>ALTER FUNCTION</>.
   To change a function's schema, you must also have <literal>CREATE</>
   privilege on the new schema.
   To alter the owner, you must also be a direct or indirect member of the new
   owning role, and that role must have <literal>CREATE</literal> privilege on
   the function's schema.  (These restrictions enforce that altering the owner
   doesn't do anything you couldn't do by dropping and recreating the function.
   However, a superuser can alter ownership of any function anyway.)
  </para>
 </refsect1>
  
 <refsect1>
  <title>Parameters</title>

  <variablelist>
   <varlistentry>
    <term><replaceable class="parameter">name</replaceable></term>
    <listitem>
     <para>
      The name (optionally schema-qualified) of an existing function.
     </para>
    </listitem>
   </varlistentry>

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

    <listitem>
     <para>
      The mode of an argument: <literal>IN</>, <literal>OUT</>,
      <literal>INOUT</>, or <literal>VARIADIC</>.
      If omitted, the default is <literal>IN</>.
      Note that <command>ALTER FUNCTION</command> does not actually pay
      any attention to <literal>OUT</> arguments, since only the input
      arguments are needed to determine the function's identity.
      So it is sufficient to list the <literal>IN</>, <literal>INOUT</>,
      and <literal>VARIADIC</> arguments.
     </para>
    </listitem>
   </varlistentry>

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

    <listitem>
     <para>
      The name of an argument.
      Note that <command>ALTER FUNCTION</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(s) of the function's arguments (optionally 
      schema-qualified), if any.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><replaceable class="parameter">new_name</replaceable></term>
    <listitem>
     <para>
      The new name of the function.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><replaceable class="parameter">new_owner</replaceable></term>
    <listitem>
     <para>
      The new owner of the function.  Note that if the function is
      marked <literal>SECURITY DEFINER</literal>, it will subsequently
      execute as the new owner.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><replaceable class="parameter">new_schema</replaceable></term>
    <listitem>
     <para>
      The new schema for the function.
     </para>
    </listitem>
   </varlistentry>

    <varlistentry>
     <term><literal>CALLED ON NULL INPUT</literal></term>
     <term><literal>RETURNS NULL ON NULL INPUT</literal></term>
     <term><literal>STRICT</literal></term>

     <listitem>
      <para>
       <literal>CALLED ON NULL INPUT</literal> changes the function so
       that it will be invoked when some or all of its arguments are
       null. <literal>RETURNS NULL ON NULL INPUT</literal> or
       <literal>STRICT</literal> changes the function so that it is not
       invoked if any of its arguments are null; instead, a null result
       is assumed automatically.  See <xref linkend="sql-createfunction">
       for more information.
      </para>
     </listitem>
   </varlistentry>

    <varlistentry>
     <term><literal>IMMUTABLE</literal></term>
     <term><literal>STABLE</literal></term>
     <term><literal>VOLATILE</literal></term>

     <listitem>
      <para>
       Change the volatility of the function to the specified setting.
       See <xref linkend="sql-createfunction"> for details.
      </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><literal><optional> EXTERNAL </optional> SECURITY INVOKER</literal></term>
    <term><literal><optional> EXTERNAL </optional> SECURITY DEFINER</literal></term>

    <listitem>
     <para>
      Change whether the function is a security definer or not. The
      key word <literal>EXTERNAL</literal> is ignored for SQL
      conformance. See <xref linkend="sql-createfunction"> for more 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><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</> saves the session's current value of
        the parameter 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>
     <para>
      Ignored for conformance with the SQL standard.
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>

 <refsect1>
  <title>Examples</title>

  <para>
   To rename the function <literal>sqrt</literal> for type
   <type>integer</type> to <literal>square_root</literal>:
<programlisting>
ALTER FUNCTION sqrt(integer) RENAME TO square_root;
</programlisting>
  </para>

  <para>
   To change the owner of the function <literal>sqrt</literal> for type
   <type>integer</type> to <literal>joe</literal>:
<programlisting>
ALTER FUNCTION sqrt(integer) OWNER TO joe;
</programlisting>
  </para>

  <para>
   To change the schema of the function <literal>sqrt</literal> for type
   <type>integer</type> to <literal>maths</literal>:
<programlisting>
ALTER FUNCTION sqrt(integer) SET SCHEMA maths;
</programlisting>
  </para>

  <para>
   To adjust the search path that is automatically set for a function:
<programlisting>
ALTER FUNCTION check_password(text) SET search_path = admin, pg_temp;
</programlisting>
  </para>

  <para>
   To disable automatic setting of <varname>search_path</> for a function:
<programlisting>
ALTER FUNCTION check_password(text) RESET search_path;
</programlisting>
   The function will now execute with whatever search path is used by its
   caller.
  </para>
 </refsect1>

 <refsect1>
  <title>Compatibility</title>

  <para>
   This statement is partially compatible with the <command>ALTER
   FUNCTION</> statement in the SQL standard. The standard allows more
   properties of a function to be modified, but does not provide the
   ability to rename a function, make a function a security definer,
   attach configuration parameter values to a function,
   or change the owner, schema, or volatility of a function. The standard also
   requires the <literal>RESTRICT</> key word, which is optional in
   <productname>PostgreSQL</>.
  </para>
 </refsect1>

 <refsect1>
  <title>See Also</title>

  <simplelist type="inline">
   <member><xref linkend="sql-createfunction"></member>
   <member><xref linkend="sql-dropfunction"></member>
  </simplelist>
 </refsect1>
</refentry>
@


1.18
log
@Easier to translate psql help

Instead of requiring translators to translate the entire SQL command
synopses, change create_help.pl to only require them to translate the
placeholders, and paste those into the synopsis using a printf mechanism.
Make some small updates to the markup to make it easier to parse.

Note: This causes msgmerge of gettext 0.17 to segfault.  You will need
the patch from https://savannah.gnu.org/bugs/?27474 to make it work.
msgmerge usually only runs on babel.postgresql.org, however.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_function.sgml,v 1.17 2008/11/14 10:22:45 petere Exp $
d8 1
a8 1
  <refentrytitle id="SQL-ALTERFUNCTION-TITLE">ALTER FUNCTION</refentrytitle>
d162 2
a163 2
       is assumed automatically.  See <xref linkend="sql-createfunction"
       endterm="sql-createfunction-title"> for more information.
d176 1
a176 2
       See <xref linkend="sql-createfunction"
       endterm="sql-createfunction-title"> for details.
d189 1
a189 2
      conformance. See <xref linkend="sql-createfunction"
      endterm="sql-createfunction-title"> for more information about
d201 1
a201 2
       See <xref linkend="sql-createfunction"
       endterm="sql-createfunction-title"> for more information.
d212 1
a212 2
       function.  See <xref linkend="sql-createfunction"
       endterm="sql-createfunction-title"> for more information.
d234 1
a234 1
        See <xref linkend="sql-set" endterm="sql-set-title"> and
d316 2
a317 2
   <member><xref linkend="sql-createfunction" endterm="sql-createfunction-title"></member>
   <member><xref linkend="sql-dropfunction" endterm="sql-dropfunction-title"></member>
@


1.17
log
@Set SQL man pages to be section 7 by default, and only transform them to
another section if required by the platform (instead of the old way of
building them in section "l" and always transforming them to the
platform-specific section).

This speeds up the installation on common platforms, and it avoids some
funny business with the man page tools and build process.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_function.sgml,v 1.16 2008/07/16 01:30:21 tgl Exp $
d33 1
a33 1
where <replaceable class="PARAMETER">action</replaceable> is one of:
@


1.16
log
@Support "variadic" functions, which can accept a variable number of arguments
so long as all the trailing arguments are of the same (non-array) type.
The function receives them as a single array argument (which is why they
have to all be the same type).

It might be useful to extend this facility to aggregates, but this patch
doesn't do that.

This patch imposes a noticeable slowdown on function lookup --- a follow-on
patch will fix that by adding a redundant column to pg_proc.

Pavel Stehule
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_function.sgml,v 1.15 2007/09/03 18:46:29 tgl Exp $
d9 1
@


1.15
log
@Support SET FROM CURRENT in CREATE/ALTER FUNCTION, ALTER DATABASE, ALTER ROLE.
(Actually, it works as a plain statement too, but I didn't document that
because it seems a bit useless.)  Unify VariableResetStmt with
VariableSetStmt, and clean up some ancient cruft in the representation of
same.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_function.sgml,v 1.14 2007/09/03 00:39:12 tgl Exp $
d84 3
a86 2
      The mode of an argument: either <literal>IN</>, <literal>OUT</>,
      or <literal>INOUT</>.  If omitted, the default is <literal>IN</>.
d90 2
a91 2
      So it is sufficient to list the <literal>IN</> and <literal>INOUT</>
      arguments.
@


1.14
log
@Implement function-local GUC parameter settings, as per recent discussion.
There are still some loose ends: I didn't do anything about the SET FROM
CURRENT idea yet, and it's not real clear whether we are happy with the
interaction of SET LOCAL with function-local settings.  The documentation
is a bit spartan, too.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_function.sgml,v 1.13 2007/01/22 01:35:19 tgl Exp $
d24 1
a24 1
    <replaceable class="PARAMETER">action</replaceable> [, ... ] [ RESTRICT ]
d39 4
a42 2
    SET <replaceable class="parameter">parameter</replaceable> { TO | = } { <replaceable class="parameter">value</replaceable> | DEFAULT }
    RESET <replaceable class="parameter">parameter</replaceable>
d220 1
a220 1
      <term><replaceable>parameter</replaceable></term>
d231 2
@


1.13
log
@Add COST and ROWS options to CREATE/ALTER FUNCTION, plus underlying pg_proc
columns procost and prorows, to allow simple user adjustment of the estimated
cost of a function call, as well as control of the estimated number of rows
returned by a set-returning function.  We might eventually wish to extend this
to allow function-specific estimation routines, but there seems to be
consensus that we should try a simple constant estimate first.  In particular
this provides a relatively simple way to control the order in which different
WHERE clauses are applied in a plan node, which is a Good Thing in view of the
fact that the recent EquivalenceClass planner rewrite made that much less
predictable than before.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_function.sgml,v 1.12 2006/09/16 00:30:16 momjian Exp $
d39 2
d217 22
d277 16
d303 1
@


1.12
log
@Remove emacs info from footer of SGML files.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_function.sgml,v 1.11 2006/02/18 23:14:45 neilc Exp $
d37 2
d191 24
@


1.11
log
@Minor SGML style police work.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_function.sgml,v 1.10 2005/11/01 21:09:50 tgl Exp $
a251 17

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../reference.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:"/usr/lib/sgml/catalog"
sgml-local-ecat-files:nil
End:
-->
@


1.10
log
@Make an editorial pass over the reference pages.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_function.sgml,v 1.9 2005/10/13 22:44:51 tgl Exp $
d154 2
a155 2
       is assumed automatically.  See <xref
       linkend="sql-createfunction"> for more information.
d167 3
a169 2
       Change the volatility of the function to the specified
       setting.  See <xref linkend="sql-createfunction"> for details.
d182 3
a184 2
      conformance. See <xref linkend="sql-createfunction"> for more
      information about this capability.
@


1.9
log
@Update documentation to reflect the new ALTER OWNER rules for all
affected types of objects.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_function.sgml,v 1.8 2005/08/01 16:11:14 tgl Exp $
d152 3
a154 2
       <literal>STRICT</literal> changes the function so that it
       always returns null if any of its arguments are null. See <xref
d168 1
a168 2
       type. See <xref linkend="sql-createfunction"> for more
       information about function volatility.
d236 1
a236 1
   requires the <literal>RESTRICT</> key word; it is optional in
@


1.8
log
@Documentation for ALTER object SET SCHEMA commands.  Also some minor
editorialization.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_function.sgml,v 1.7 2005/05/26 20:05:03 tgl Exp $
d49 1
a49 2
   You must own the function to use <command>ALTER FUNCTION</>; except for
   <command>ALTER FUNCTION OWNER</>, which may only be executed by a superuser.
d52 5
@


1.7
log
@Document that utility commands such as DROP FUNCTION allow argument names
and modes to be included when naming an existing function.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_function.sgml,v 1.6 2005/03/14 00:19:36 neilc Exp $
d26 1
a26 1
    RENAME TO <replaceable>newname</replaceable>
d28 3
a30 1
    OWNER TO <replaceable>newowner</replaceable>
d47 7
d110 1
a110 1
    <term><replaceable class="parameter">newname</replaceable></term>
d119 1
a119 1
    <term><replaceable class="parameter">newowner</replaceable></term>
d122 1
a122 2
      The new owner of the function.  To change the owner of a
      function, you must be a superuser.  Note that if the function is
d129 9
d213 8
d231 1
a231 1
   or change the owner or volatility of a function. The standard also
@


1.6
log
@Allow ALTER FUNCTION to change a function's strictness, volatility, and
whether or not it is a security definer. Changing a function's strictness
is required by SQL2003, and the other capabilities make sense. Also, allow
an optional RESTRICT noise word to be specified, for SQL conformance.

Some trivial regression tests added and the documentation has been
updated.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_function.sgml,v 1.5 2004/06/25 21:55:50 tgl Exp $
d23 6
a28 3
ALTER FUNCTION <replaceable>name</replaceable> ( [ <replaceable class="parameter">type</replaceable> [, ...] ] ) <replaceable class="PARAMETER">action</replaceable> [, ... ] [ RESTRICT ]
ALTER FUNCTION <replaceable>name</replaceable> ( [ <replaceable class="parameter">type</replaceable> [, ...] ] ) RENAME TO <replaceable>newname</replaceable>
ALTER FUNCTION <replaceable>name</replaceable> ( [ <replaceable class="parameter">type</replaceable> [, ...] ] ) OWNER TO <replaceable>newowner</replaceable>
d61 31
a91 1
    <term><replaceable class="parameter">type</replaceable></term>
d94 2
a95 1
      The data type of an argument of the function.
d153 2
a154 2
    <term><literal><optional>EXTERNAL</optional> SECURITY INVOKER</literal></term>
    <term><literal><optional>EXTERNAL</optional> SECURITY DEFINER</literal></term>
@


1.5
log
@Support renaming of tablespaces, and changing the owners of
aggregates, conversions, functions, operators, operator classes,
schemas, types, and tablespaces.  Fold the existing implementations
of alter domain owner and alter database owner in with these.

Christopher Kings-Lynne
@
text
@d2 1
a2 1
$PostgreSQL: pgsql-server/doc/src/sgml/ref/alter_function.sgml,v 1.4 2003/11/29 19:51:38 pgsql Exp $
d23 1
d26 6
d79 59
a137 5
      The new owner of the function.
      To change the owner of a function, you must be a superuser.
      Note that if the function is marked
      <literal>SECURITY DEFINER</literal>,
      it will subsequently execute as the new owner.
d168 7
a174 3
   There is an <command>ALTER FUNCTION</command> statement in the SQL
   standard, but it does not provide the option to rename the
   function or change the owner.
@


1.4
log
@
$Header: -> $PostgreSQL Changes ...
@
text
@d2 1
a2 1
$PostgreSQL: /cvsroot/pgsql-server/doc/src/sgml/ref/alter_function.sgml,v 1.3 2003/09/09 18:28:52 tgl Exp $
d24 1
d33 1
a33 1
   function.  The only functionality is to rename the function.
d67 13
d93 8
d109 1
a109 1
   function.
@


1.3
log
@Remove a bunch of content-free Diagnostics sections, as per previous
discussion.  (Still have some work to do editing the remainder.)
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/alter_function.sgml,v 1.2 2003/08/31 17:32:21 petere Exp $
@


1.2
log
@Add/edit index entries.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/alter_function.sgml,v 1.1 2003/06/27 14:45:25 petere Exp $
a62 15
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>
   
 <refsect1>
  <title>Diagnostics</title>

  <variablelist>
   <varlistentry>
    <term><computeroutput>ALTER FUNCTION</computeroutput></term>
    <listitem>
     <para>
      Message returned if the command was successful.
@


1.1
log
@First batch of object rename commands.
@
text
@d2 1
a2 1
$Header$
d17 4
@


1.1.2.1
log
@Update this branch to match CVS head, includes WIN32 improvements.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/alter_function.sgml,v 1.2 2003/08/31 17:32:21 petere Exp $
a16 4
 <indexterm zone="sql-alterfunction">
  <primary>ALTER FUNCTION</primary>
 </indexterm>

@


