mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
DROP ... IF EXISTS for the following cases:
language, tablespace, trigger, rule, opclass, function, aggregate. operator, and cast.
This commit is contained in:
@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/commands/aggregatecmds.c,v 1.34 2006/04/15 17:45:33 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/commands/aggregatecmds.c,v 1.35 2006/06/16 20:23:44 adunstan Exp $
|
||||
*
|
||||
* DESCRIPTION
|
||||
* The "DefineFoo" routines take the parse tree and pick out the
|
||||
@ -211,7 +211,21 @@ RemoveAggregate(RemoveFuncStmt *stmt)
|
||||
ObjectAddress object;
|
||||
|
||||
/* Look up function and make sure it's an aggregate */
|
||||
procOid = LookupAggNameTypeNames(aggName, aggArgs, false);
|
||||
procOid = LookupAggNameTypeNames(aggName, aggArgs, stmt->missing_ok);
|
||||
|
||||
if (!OidIsValid(procOid))
|
||||
{
|
||||
/* we only get here if stmt->missing_ok is true */
|
||||
|
||||
/* XXX might need better message here */
|
||||
|
||||
ereport(NOTICE,
|
||||
(errmsg("aggregate %s does not exist ... skipping",
|
||||
stmt->name)));
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Find the function tuple, do permissions and validity checks
|
||||
|
Reference in New Issue
Block a user