1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-18 17:42:25 +03:00

Fix DROP ACCESS METHOD IF EXISTS.

The IF EXISTS option was documented, and implemented in the grammar, but
it didn't actually work for lack of support in does_not_exist_skipping().
Per bug #14160.

Report and patch by Kouhei Sutou

Report: <20160527070433.19424.81712@wrigleys.postgresql.org>
This commit is contained in:
Tom Lane
2016-05-27 11:03:18 -04:00
parent 9dd4178cec
commit 83dbde94f7
3 changed files with 14 additions and 1 deletions

View File

@ -262,6 +262,10 @@ does_not_exist_skipping(ObjectType objtype, List *objname, List *objargs)
switch (objtype)
{
case OBJECT_ACCESS_METHOD:
msg = gettext_noop("access method \"%s\" does not exist, skipping");
name = NameListToString(objname);
break;
case OBJECT_TYPE:
case OBJECT_DOMAIN:
{
@ -438,7 +442,7 @@ does_not_exist_skipping(ObjectType objtype, List *objname, List *objargs)
}
break;
default:
elog(ERROR, "unexpected object type (%d)", (int) objtype);
elog(ERROR, "unrecognized object type: %d", (int) objtype);
break;
}