diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2016-05-27 11:03:18 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2016-05-27 11:03:18 -0400 |
commit | 83dbde94f726f2517a79b1cea59e57452c36e734 (patch) | |
tree | f2e6f5e3d161528894330c461f473bea3c6264aa /src/test | |
parent | 9dd4178cec3ffd825a4bef558632b7cba3e426c5 (diff) | |
download | postgresql-83dbde94f726f2517a79b1cea59e57452c36e734.tar.gz postgresql-83dbde94f726f2517a79b1cea59e57452c36e734.zip |
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>
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/regress/expected/drop_if_exists.out | 5 | ||||
-rw-r--r-- | src/test/regress/sql/drop_if_exists.sql | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/test/regress/expected/drop_if_exists.out b/src/test/regress/expected/drop_if_exists.out index 6910b627c15..9cda96b6dea 100644 --- a/src/test/regress/expected/drop_if_exists.out +++ b/src/test/regress/expected/drop_if_exists.out @@ -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; diff --git a/src/test/regress/sql/drop_if_exists.sql b/src/test/regress/sql/drop_if_exists.sql index 03547ccae7a..4ff04507311 100644 --- a/src/test/regress/sql/drop_if_exists.sql +++ b/src/test/regress/sql/drop_if_exists.sql @@ -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; |