1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-22 02:52:08 +03:00

Implement IF NOT EXIST for CREATE INDEX.

Fabrízio de Royes Mello, reviewed by Marti Raudsepp, Adam Brightwell and me.
This commit is contained in:
Fujii Masao
2014-11-06 18:48:33 +09:00
parent 171c377a0a
commit 08309aaf74
11 changed files with 85 additions and 5 deletions

View File

@ -610,7 +610,14 @@ DefineIndex(Oid relationId,
stmt->isconstraint, stmt->deferrable, stmt->initdeferred,
allowSystemTableMods,
skip_build || stmt->concurrent,
stmt->concurrent, !check_rights);
stmt->concurrent, !check_rights,
stmt->if_not_exists);
if (!OidIsValid(indexRelationId))
{
heap_close(rel, NoLock);
return indexRelationId;
}
/* Add any requested comment */
if (stmt->idxcomment != NULL)