1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Add DROP INDEX CONCURRENTLY [IF EXISTS], uses ShareUpdateExclusiveLock

This commit is contained in:
Simon Riggs
2012-04-06 10:21:40 +01:00
parent 21cc529698
commit 8cb53654db
14 changed files with 337 additions and 26 deletions

View File

@@ -631,10 +631,15 @@ standard_ProcessUtility(Node *parsetree,
case T_DropStmt:
switch (((DropStmt *) parsetree)->removeType)
{
case OBJECT_INDEX:
if (((DropStmt *) parsetree)->concurrent)
PreventTransactionChain(isTopLevel,
"DROP INDEX CONCURRENTLY");
/* fall through */
case OBJECT_TABLE:
case OBJECT_SEQUENCE:
case OBJECT_VIEW:
case OBJECT_INDEX:
case OBJECT_FOREIGN_TABLE:
RemoveRelations((DropStmt *) parsetree);
break;