2 $Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_function.sgml,v 1.15 2001/11/19 03:58:25 tgl Exp $
6 <refentry id="SQL-DROPFUNCTION">
8 <refentrytitle id="SQL-DROPFUNCTION-TITLE">
11 <refmiscinfo>SQL - Language Statements</refmiscinfo>
18 remove a user-defined function
23 <date>1999-07-20</date>
26 DROP FUNCTION <replaceable class="parameter">name</replaceable> ( [ <replaceable class="parameter">type</replaceable> [, ...] ] )
29 <refsect2 id="R2-SQL-DROPFUNCTION-1">
31 <date>1998-04-15</date>
39 <term><replaceable class="parameter">name</replaceable></term>
42 The name of an existing function.
47 <term><replaceable class="parameter">type</replaceable></term>
50 The type of the function's parameters.
58 <refsect2 id="R2-SQL-DROPFUNCTION-2">
60 <date>1998-04-15</date>
69 <term><computeroutput>
71 </computeroutput></term>
74 Message returned if the command completes successfully.
79 <term><computeroutput>
80 NOTICE RemoveFunction: Function "<replaceable class="parameter">name</replaceable>" ("<replaceable class="parameter">types</replaceable>") does not exist
81 </computeroutput></term>
84 This message is given if the function specified does not
85 exist in the current database.
94 <refsect1 id="R1-SQL-DROPFUNCTION-1">
96 <date>1998-04-15</date>
102 DROP FUNCTION will remove the definition of an existing
103 function. To execute this command the user must be the
104 owner of the function. The input argument types to the
105 function must be specified, since several different functions
106 may exist with the same name and different argument lists.
110 <refsect1 id="SQL-DROPFUNCTION-notes">
115 <xref linkend="sql-createfunction">
116 for information on creating functions.
120 No checks are made to ensure that types, operators, access
121 methods, or triggers that rely on the function have been removed first.
125 <refsect1 id="SQL-DROPFUNCTION-examples">
126 <title>Examples</title>
129 This command removes the square root function:
132 DROP FUNCTION sqrt(integer);
137 <refsect1 id="SQL-DROPFUNCTION-compatibility">
138 <title>Compatibility</title>
141 A <command>DROP FUNCTION</command> statement is defined in SQL99. One of its syntax forms is:
144 DROP FUNCTION <replaceable class="parameter">name</replaceable> (<replaceable>arg</>, ...) { RESTRICT | CASCADE }
147 where <literal>CASCADE</> specifies dropping all objects that
148 depend on the function and <literal>RESTRICT</literal> refuses to
149 drop the function if dependent objects exist.
154 <title>See Also</title>
156 <simplelist type="inline">
157 <member><xref linkend="sql-createfunction"></member>
162 <!-- Keep this comment at the end of the file
167 sgml-minimize-attributes:nil
168 sgml-always-quote-attributes:t
171 sgml-parent-document:nil
172 sgml-default-dtd-file:"../reference.ced"
173 sgml-exposed-tags:nil
174 sgml-local-catalogs:"/usr/lib/sgml/catalog"
175 sgml-local-ecat-files:nil