index 5883d138115c855256400144bac54e6d4fd9a52a..5969b084b44c485abe8fb7f76d908f43baa52576 100644 (file)
<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>
index 13dd974f384f2ea4c118d02aaf7ee3b4615dff53..fc82c3e0e3f3db35b2d9af0d14997d7c8e6ea708 100644 (file)
<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>
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>
index 1b06d358b502062f6c51d236f16dc6d79ec5f549..542b09b4b0f771a523b7e3517a95e935240f830f 100644 (file)
@@ -358,7 +358,7 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query);
%type <list> privileges privilege_list
%type <privtarget> privilege_target
%type <objwithargs> function_with_argtypes aggregate_with_argtypes operator_with_argtypes
-%type <list> function_with_argtypes_list
+%type <list> function_with_argtypes_list aggregate_with_argtypes_list operator_with_argtypes_list
%type <ival> defacl_privilege_target
%type <defelt> DefACLOption
%type <list> DefACLOptionList
}
;
+aggregate_with_argtypes_list:
+ aggregate_with_argtypes { $$ = list_make1(1ドル); }
+ | aggregate_with_argtypes_list ',' aggregate_with_argtypes
+ { $$ = lappend(1,ドル 3ドル); }
+ ;
+
createfunc_opt_list:
/* Must be at least one to prevent conflict */
createfunc_opt_item { $$ = list_make1(1ドル); }
*****************************************************************************/
RemoveFuncStmt:
- DROP FUNCTION function_with_argtypes opt_drop_behavior
+ DROP FUNCTION function_with_argtypes_list opt_drop_behavior
{
DropStmt *n = makeNode(DropStmt);
n->removeType = OBJECT_FUNCTION;
- n->objects = list_make1(3ドル);
+ n->objects = 3ドル;
n->behavior = 4ドル;
n->missing_ok = false;
n->concurrent = false;
$$ = (Node *)n;
}
- | DROP FUNCTION IF_P EXISTS function_with_argtypes opt_drop_behavior
+ | DROP FUNCTION IF_P EXISTS function_with_argtypes_list opt_drop_behavior
{
DropStmt *n = makeNode(DropStmt);
n->removeType = OBJECT_FUNCTION;
- n->objects = list_make1(5ドル);
+ n->objects = 5ドル;
n->behavior = 6ドル;
n->missing_ok = true;
n->concurrent = false;
;
RemoveAggrStmt:
- DROP AGGREGATE aggregate_with_argtypes opt_drop_behavior
+ DROP AGGREGATE aggregate_with_argtypes_list opt_drop_behavior
{
DropStmt *n = makeNode(DropStmt);
n->removeType = OBJECT_AGGREGATE;
- n->objects = list_make1(3ドル);
+ n->objects = 3ドル;
n->behavior = 4ドル;
n->missing_ok = false;
n->concurrent = false;
$$ = (Node *)n;
}
- | DROP AGGREGATE IF_P EXISTS aggregate_with_argtypes opt_drop_behavior
+ | DROP AGGREGATE IF_P EXISTS aggregate_with_argtypes_list opt_drop_behavior
{
DropStmt *n = makeNode(DropStmt);
n->removeType = OBJECT_AGGREGATE;
- n->objects = list_make1(5ドル);
+ n->objects = 5ドル;
n->behavior = 6ドル;
n->missing_ok = true;
n->concurrent = false;
;
RemoveOperStmt:
- DROP OPERATOR operator_with_argtypes opt_drop_behavior
+ DROP OPERATOR operator_with_argtypes_list opt_drop_behavior
{
DropStmt *n = makeNode(DropStmt);
n->removeType = OBJECT_OPERATOR;
- n->objects = list_make1(3ドル);
+ n->objects = 3ドル;
n->behavior = 4ドル;
n->missing_ok = false;
n->concurrent = false;
$$ = (Node *)n;
}
- | DROP OPERATOR IF_P EXISTS operator_with_argtypes opt_drop_behavior
+ | DROP OPERATOR IF_P EXISTS operator_with_argtypes_list opt_drop_behavior
{
DropStmt *n = makeNode(DropStmt);
n->removeType = OBJECT_OPERATOR;
- n->objects = list_make1(5ドル);
+ n->objects = 5ドル;
n->behavior = 6ドル;
n->missing_ok = true;
n->concurrent = false;
{ $$ = lcons(makeString(1ドル), 3ドル); }
;
+operator_with_argtypes_list:
+ operator_with_argtypes { $$ = list_make1(1ドル); }
+ | operator_with_argtypes_list ',' operator_with_argtypes
+ { $$ = lappend(1,ドル 3ドル); }
+ ;
+
operator_with_argtypes:
any_operator oper_argtypes
{
index 7bb957b51b45e5cdf545ac935990d1ed2bc15ff2..cc4e98a1d4b77144df09247ff53e24a8786db6f7 100644 (file)
@@ -217,9 +217,10 @@ SELECT routine_name, ordinal_position, parameter_name, parameter_default
functest_is_3 | 2 | b |
(7 rows)
+DROP FUNCTION functest_IS_1(int, int, text), functest_IS_2(int), functest_IS_3(int);
-- Cleanups
DROP SCHEMA temp_func_test CASCADE;
-NOTICE: drop cascades to 19 other objects
+NOTICE: drop cascades to 16 other objects
DETAIL: drop cascades to function functest_a_1(text,date)
drop cascades to function functest_a_2(text[])
drop cascades to function functest_a_3()
@@ -236,8 +237,5 @@ drop cascades to function functext_f_1(integer)
drop cascades to function functext_f_2(integer)
drop cascades to function functext_f_3(integer)
drop cascades to function functext_f_4(integer)
-drop cascades to function functest_is_1(integer,integer,text)
-drop cascades to function functest_is_2(integer)
-drop cascades to function functest_is_3(integer)
DROP USER regress_unpriv_user;
RESET search_path;