1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-25 01:02:05 +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

@ -227,6 +227,11 @@ DROP OPERATOR FAMILY test_operator_family USING no_such_am;
ERROR: access method "no_such_am" does not exist
DROP OPERATOR FAMILY IF EXISTS test_operator_family USING no_such_am;
ERROR: access method "no_such_am" does not exist
-- access method
DROP ACCESS METHOD no_such_am;
ERROR: access method "no_such_am" does not exist
DROP ACCESS METHOD IF EXISTS no_such_am;
NOTICE: access method "no_such_am" does not exist, skipping
-- drop the table
DROP TABLE IF EXISTS test_exists;
DROP TABLE test_exists;

View File

@ -227,6 +227,10 @@ DROP OPERATOR FAMILY IF EXISTS test_operator_family USING btree;
DROP OPERATOR FAMILY test_operator_family USING no_such_am;
DROP OPERATOR FAMILY IF EXISTS test_operator_family USING no_such_am;
-- access method
DROP ACCESS METHOD no_such_am;
DROP ACCESS METHOD IF EXISTS no_such_am;
-- drop the table
DROP TABLE IF EXISTS test_exists;