@@ -286,7 +286,7 @@ make_name(void)
286286%type <str> CreateAsElement OptCreateAs CreateAsList CreateAsStmt
287287%type <str> OptUnder key_reference comment_text ConstraintDeferrabilitySpec
288288%type <str> key_match ColLabel SpecialRuleRelation ColId columnDef
289- %type <str> ColConstraint ColConstraintElem
289+ %type <str> ColConstraint ColConstraintElem drop_type
290290%type <str> OptTableElementList OptTableElement TableConstraint
291291%type <str> ConstraintElem key_actions ColQualList TokenId DropSchemaStmt
292292%type <str> target_list target_el update_target_list alias_clause
@@ -321,7 +321,7 @@ make_name(void)
321321%type <str> RuleActionStmtOrEmpty RuleActionMulti func_as reindex_type
322322%type <str> RuleStmt opt_column opt_name oper_argtypes sysid_clause
323323%type <str> MathOp RemoveFuncStmt aggr_argtype for_update_clause
324- %type <str> RemoveAggrStmt remove_type RemoveStmt ExtendStmt
324+ %type <str> RemoveAggrStmt ExtendStmt
325325%type <str> RemoveOperStmt RenameStmt all_Op user_valid_clause
326326%type <str> VariableSetStmt var_value zone_value VariableShowStmt
327327%type <str> VariableResetStmt AlterTableStmt DropUserStmt from_list
@@ -434,7 +434,6 @@ stmt: AlterSchemaStmt { output_statement($1, 0, NULL, connection); }
434434| RemoveAggrStmt { output_statement($1 ,0 ,NULL , connection); }
435435| RemoveOperStmt { output_statement($1 ,0 ,NULL , connection); }
436436| RemoveFuncStmt { output_statement($1 ,0 ,NULL , connection); }
437- | RemoveStmt { output_statement($1 ,0 ,NULL , connection); }
438437| RenameStmt { output_statement($1 ,0 ,NULL , connection); }
439438| RevokeStmt { output_statement($1 ,0 ,NULL , connection); }
440439| OptimizableStmt {
@@ -1553,20 +1552,25 @@ def_arg: func_return{ $$ = $1; }
15531552/* ****************************************************************************
15541553 *
15551554 *QUERY:
1556- *drop <relname1> [, <relname2> .. <relnameN> ]
1555+ *
1556+ * DROP itemtype itemname [, itemname ...]
15571557 *
15581558 *****************************************************************************/
15591559
1560- DropStmt :DROP TABLE relation_name_list
1561- {
1562- $$ = cat2_str(make_str(" drop table" ),$3 );
1563- }
1564- | DROP SEQUENCE relation_name_list
1560+ DropStmt :DROP drop_type relation_name_list
15651561{
1566- $$ =cat2_str( make_str(" drop sequence " ) ,$3 );
1562+ $$ =cat_str( 3 , make_str(" drop" ), $2 ,$3 );
15671563}
15681564;
15691565
1566+ drop_type :TABLE {$$ = make_str(" table" ); }
1567+ | SEQUENCE {$$ = make_str(" sequence" ); }
1568+ | VIEW {$$ = make_str(" view" ); }
1569+ | INDEX {$$ = make_str(" index" ); }
1570+ | RULE {$$ = make_str(" rule" ); }
1571+ | TYPE_P {$$ = make_str(" type" ); }
1572+ ;
1573+
15701574/* ****************************************************************************
15711575 *
15721576 * QUERY:
@@ -1985,32 +1989,18 @@ func_return: Typename
19851989 *
19861990 *QUERY:
19871991 *
1988- *remove function <funcname>
1989- *(REMOVE FUNCTION "funcname" (arg1, arg2, ...))
1990- *remove aggregate <aggname>
1991- *(REMOVE AGGREGATE "aggname" "aggtype")
1992- *remove operator <opname>
1993- *(REMOVE OPERATOR "opname" (leftoperand_typ rightoperand_typ))
1994- *remove type <typename>
1995- *(REMOVE TYPE "typename")
1996- *remove rule <rulename>
1997- *(REMOVE RULE "rulename")
1992+ * DROP FUNCTION funcname (arg1, arg2, ...)
1993+ * DROP AGGREGATE aggname aggtype
1994+ * DROP OPERATOR opname (leftoperand_typ rightoperand_typ)
19981995 *
19991996 *****************************************************************************/
20001997
2001- RemoveStmt :DROP remove_type name
1998+ RemoveFuncStmt :DROP FUNCTION func_name func_args
20021999{
2003- $$ = cat_str(3 , make_str(" drop" ),$2 ,$3 );
2000+ $$ = cat_str(3 , make_str(" drop function " ),$3 ,$4 );
20042001}
20052002;
20062003
2007- remove_type :TYPE_P {$$ = make_str(" type" ); }
2008- | INDEX {$$ = make_str(" index" ); }
2009- | RULE {$$ = make_str(" rule" ); }
2010- | VIEW {$$ = make_str(" view" ); }
2011- ;
2012-
2013-
20142004RemoveAggrStmt :DROP AGGREGATE name aggr_argtype
20152005{
20162006$$ = cat_str(3 , make_str(" drop aggregate" ),$3 ,$4 );
@@ -2022,13 +2012,6 @@ aggr_argtype: Typename{ $$ = $1; }
20222012;
20232013
20242014
2025- RemoveFuncStmt :DROP FUNCTION func_name func_args
2026- {
2027- $$ = cat_str(3 , make_str(" drop function" ),$3 ,$4 );
2028- }
2029- ;
2030-
2031-
20322015RemoveOperStmt :DROP OPERATOR all_Op ' (' oper_argtypes ' )'
20332016{
20342017$$ = cat_str(5 , make_str(" drop operator" ),$3 , make_str(" (" ),$5 , make_str(" )" ));