Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e323c55

Browse files
committed
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 8cb5365. Per report from Brendan Byrd.
1 parent e40bddb commit e323c55

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/backend/parser/gram.y

+1-1
Original file line numberDiff line numberDiff line change
@@ -4941,7 +4941,7 @@ DropStmt: DROP drop_type IF_P EXISTS any_name_list opt_drop_behavior
49414941
{
49424942
DropStmt *n = makeNode(DropStmt);
49434943
n->removeType = OBJECT_INDEX;
4944-
n->missing_ok = FALSE;
4944+
n->missing_ok = TRUE;
49454945
n->objects = $6;
49464946
n->arguments = NIL;
49474947
n->behavior = $7;

src/test/regress/expected/create_index.out

+1-1
Original file line numberDiff line numberDiff line change
@@ -2321,7 +2321,7 @@ Indexes:
23212321
--
23222322
DROP INDEX CONCURRENTLY "concur_index2"; -- works
23232323
DROP INDEX CONCURRENTLY IF EXISTS "concur_index2"; -- notice
2324-
ERROR: index "concur_index2" does not exist
2324+
NOTICE: index "concur_index2" does not exist, skipping
23252325
-- failures
23262326
DROP INDEX CONCURRENTLY "concur_index2", "concur_index3";
23272327
ERROR: DROP INDEX CONCURRENTLY does not support dropping multiple objects

0 commit comments

Comments
 (0)