summaryrefslogtreecommitdiff
path: root/doc/src/sgml/ref/alter_function.sgml
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-06-25 21:55:59 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-06-25 21:55:59 +0000
commit0adfa2c39d567394f423c69bfaf467d0d00ee3df (patch)
tree215559f976b4e28454fcf7abaa8c96c748ec7fef /doc/src/sgml/ref/alter_function.sgml
parent1621192b11369a7f0c47aaff1c8ec16bad29ab69 (diff)
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
Diffstat (limited to 'doc/src/sgml/ref/alter_function.sgml')
-rw-r--r--doc/src/sgml/ref/alter_function.sgml28
1 files changed, 25 insertions, 3 deletions
diff --git a/doc/src/sgml/ref/alter_function.sgml b/doc/src/sgml/ref/alter_function.sgml
index 71ae81893b3..00dfcac007a 100644
--- a/doc/src/sgml/ref/alter_function.sgml
+++ b/doc/src/sgml/ref/alter_function.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/alter_function.sgml,v 1.4 2003/11/29 19:51:38 pgsql Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/alter_function.sgml,v 1.5 2004/06/25 21:55:50 tgl Exp $
PostgreSQL documentation
-->
@@ -21,6 +21,7 @@ PostgreSQL documentation
<refsynopsisdiv>
<synopsis>
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>
</synopsis>
</refsynopsisdiv>
@@ -29,7 +30,7 @@ ALTER FUNCTION <replaceable>name</replaceable> ( [ <replaceable class="parameter
<para>
<command>ALTER FUNCTION</command> changes the definition of a
- function. The only functionality is to rename the function.
+ function.
</para>
</refsect1>
@@ -63,6 +64,19 @@ ALTER FUNCTION <replaceable>name</replaceable> ( [ <replaceable class="parameter
</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><replaceable class="parameter">newowner</replaceable></term>
+ <listitem>
+ <para>
+ 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.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</refsect1>
@@ -76,6 +90,14 @@ ALTER FUNCTION <replaceable>name</replaceable> ( [ <replaceable class="parameter
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>
</refsect1>
<refsect1>
@@ -84,7 +106,7 @@ ALTER FUNCTION sqrt(integer) RENAME TO square_root;
<para>
There is an <command>ALTER FUNCTION</command> statement in the SQL
standard, but it does not provide the option to rename the
- function.
+ function or change the owner.
</para>
</refsect1>