aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2012-08-27 12:45:43 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2012-08-27 12:45:43 -0400
commite323c553017601597b6a5f9f19426587df512ad9 (patch)
tree45f0cf3b14708b63c2870f466a7ef8fddad28cda /src
parente40bddb0f3ce9f9bf7c960b35f6ac0c19f65612b (diff)
downloadpostgresql-e323c553017601597b6a5f9f19426587df512ad9.tar.gz
postgresql-e323c553017601597b6a5f9f19426587df512ad9.zip
Fix DROP INDEX CONCURRENTLY IF EXISTS.
This threw ERROR, not the expected NOTICE, if the index didn't exist. The bug was actually visible in not-as-expected regression test output, so somebody wasn't paying too close attention in commit 8cb53654dbdb4c386369eb988062d0bbb6de725e. Per report from Brendan Byrd.
Diffstat (limited to 'src')
-rw-r--r--src/backend/parser/gram.y2
-rw-r--r--src/test/regress/expected/create_index.out2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 90ea1f9f004..5894cb0885c 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -4941,7 +4941,7 @@ DropStmt: DROP drop_type IF_P EXISTS any_name_list opt_drop_behavior
{
DropStmt *n = makeNode(DropStmt);
n->removeType = OBJECT_INDEX;
- n->missing_ok = FALSE;
+ n->missing_ok = TRUE;
n->objects = $6;
n->arguments = NIL;
n->behavior = $7;
diff --git a/src/test/regress/expected/create_index.out b/src/test/regress/expected/create_index.out
index 1f27b8e75f6..999e38a6798 100644
--- a/src/test/regress/expected/create_index.out
+++ b/src/test/regress/expected/create_index.out
@@ -2321,7 +2321,7 @@ Indexes:
--
DROP INDEX CONCURRENTLY "concur_index2"; -- works
DROP INDEX CONCURRENTLY IF EXISTS "concur_index2"; -- notice
-ERROR: index "concur_index2" does not exist
+NOTICE: index "concur_index2" does not exist, skipping
-- failures
DROP INDEX CONCURRENTLY "concur_index2", "concur_index3";
ERROR: DROP INDEX CONCURRENTLY does not support dropping multiple objects