3
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
4
<title>DROP FUNCTION</title>
5
<link rel="stylesheet" href="stylesheet.css" type="text/css">
6
<link rev="made" href="pgsql-docs@postgresql.org">
7
<meta name="generator" content="DocBook XSL Stylesheets V1.64.1">
8
<link rel="home" href="index.html" title="PostgreSQL 8.0.0beta5 Documentation">
9
<link rel="up" href="sql-commands.html" title="SQL Commands">
10
<link rel="previous" href="sql-dropdomain.html" title="DROP DOMAIN">
11
<link rel="next" href="sql-dropgroup.html" title="DROP GROUP">
13
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
14
<a name="sql-dropfunction"></a><div class="titlepage">
18
<div class="refnamediv">
20
<p>DROP FUNCTION — remove a function</p>
22
<a name="id2683940"></a><div class="refsynopsisdiv">
24
<pre class="synopsis">DROP FUNCTION <i class="replaceable"><tt>name</tt></i> ( [ <i class="replaceable"><tt>type</tt></i> [, ...] ] ) [ CASCADE | RESTRICT ]</pre>
26
<div class="refsect1" lang="en">
27
<a name="id2683967"></a><h2>Description</h2>
28
<p> <tt class="command">DROP FUNCTION</tt> removes the definition of an existing
29
function. To execute this command the user must be the
30
owner of the function. The argument types to the
31
function must be specified, since several different functions
32
may exist with the same name and different argument lists.
35
<div class="refsect1" lang="en">
36
<a name="id2683983"></a><h2>Parameters</h2>
37
<div class="variablelist"><dl>
38
<dt><span class="term"><i class="replaceable"><tt>name</tt></i></span></dt>
39
<dd><p> The name (optionally schema-qualified) of an existing function.
41
<dt><span class="term"><i class="replaceable"><tt>type</tt></i></span></dt>
42
<dd><p> The data type of an argument of the function.
44
<dt><span class="term"><tt class="literal">CASCADE</tt></span></dt>
45
<dd><p> Automatically drop objects that depend on the function (such as
46
operators or triggers).
48
<dt><span class="term"><tt class="literal">RESTRICT</tt></span></dt>
49
<dd><p> Refuse to drop the function if any objects depend on it. This
54
<div class="refsect1" lang="en">
55
<a name="sql-dropfunction-examples"></a><h2>Examples</h2>
56
<p> This command removes the square root function:
59
<pre class="programlisting">DROP FUNCTION sqrt(integer);</pre>
63
<div class="refsect1" lang="en">
64
<a name="sql-dropfunction-compatibility"></a><h2>Compatibility</h2>
65
<p> A <tt class="command">DROP FUNCTION</tt> statement is defined in the SQL
66
standard, but it is not compatible with this command.
69
<div class="refsect1" lang="en">
70
<a name="id2684070"></a><h2>See Also</h2>
71
<span class="simplelist"><a href="sql-createfunction.html">CREATE FUNCTION</a>, <a href="sql-alterfunction.html">ALTER FUNCTION</a></span>