mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Allow dropping multiple functions at once
The generic drop support already supported dropping multiple objects of the same kind at once. But the previous representation of function signatures across two grammar symbols and structure members made this cumbersome to do for functions, so it was not supported. Now that function signatures are represented by a single structure, it's trivial to add this support. Same for aggregates and operators. Reviewed-by: Jim Nasby <Jim.Nasby@BlueTreble.com> Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
This commit is contained in:
@@ -21,7 +21,7 @@ PostgreSQL documentation
|
||||
|
||||
<refsynopsisdiv>
|
||||
<synopsis>
|
||||
DROP AGGREGATE [ IF EXISTS ] <replaceable>name</replaceable> ( <replaceable>aggregate_signature</replaceable> ) [ CASCADE | RESTRICT ]
|
||||
DROP AGGREGATE [ IF EXISTS ] <replaceable>name</replaceable> ( <replaceable>aggregate_signature</replaceable> ) [, ...] [ CASCADE | RESTRICT ]
|
||||
|
||||
<phrase>where <replaceable>aggregate_signature</replaceable> is:</phrase>
|
||||
|
||||
@@ -155,7 +155,14 @@ DROP AGGREGATE myavg(integer);
|
||||
DROP AGGREGATE myrank(VARIADIC "any" ORDER BY VARIADIC "any");
|
||||
</programlisting>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<para>
|
||||
To remove multiple aggregate functions in one command:
|
||||
<programlisting>
|
||||
DROP AGGREGATE myavg(integer), myavg(bigint);
|
||||
</programlisting>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Compatibility</title>
|
||||
|
@@ -21,7 +21,7 @@ PostgreSQL documentation
|
||||
|
||||
<refsynopsisdiv>
|
||||
<synopsis>
|
||||
DROP FUNCTION [ IF EXISTS ] <replaceable class="parameter">name</replaceable> ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] )
|
||||
DROP FUNCTION [ IF EXISTS ] <replaceable class="parameter">name</replaceable> ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] ) [, ...]
|
||||
[ CASCADE | RESTRICT ]
|
||||
</synopsis>
|
||||
</refsynopsisdiv>
|
||||
@@ -134,6 +134,12 @@ DROP FUNCTION [ IF EXISTS ] <replaceable class="parameter">name</replaceable> (
|
||||
|
||||
<programlisting>
|
||||
DROP FUNCTION sqrt(integer);
|
||||
</programlisting></para>
|
||||
|
||||
<para>
|
||||
Drop multiple functions in one command:
|
||||
<programlisting>
|
||||
DROP FUNCTION sqrt(integer), sqrt(bigint);
|
||||
</programlisting></para>
|
||||
</refsect1>
|
||||
|
||||
|
@@ -21,7 +21,7 @@ PostgreSQL documentation
|
||||
|
||||
<refsynopsisdiv>
|
||||
<synopsis>
|
||||
DROP OPERATOR [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> ( { <replaceable class="PARAMETER">left_type</replaceable> | NONE } , { <replaceable class="PARAMETER">right_type</replaceable> | NONE } ) [ CASCADE | RESTRICT ]
|
||||
DROP OPERATOR [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> ( { <replaceable class="PARAMETER">left_type</replaceable> | NONE } , { <replaceable class="PARAMETER">right_type</replaceable> | NONE } ) [, ...] [ CASCADE | RESTRICT ]
|
||||
</synopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
@@ -125,6 +125,12 @@ DROP OPERATOR ~ (none, bit);
|
||||
for type <type>bigint</type>:
|
||||
<programlisting>
|
||||
DROP OPERATOR ! (bigint, none);
|
||||
</programlisting></para>
|
||||
|
||||
<para>
|
||||
Remove multiple operators in one command:
|
||||
<programlisting>
|
||||
DROP OPERATOR ~ (none, bit), ! (bigint, none);
|
||||
</programlisting></para>
|
||||
</refsect1>
|
||||
|
||||
|
Reference in New Issue
Block a user