1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-28 11:55:03 +03:00

Implement IF NOT EXISTS for CREATE SEQUENCE.

Fabrízio de Royes Mello
This commit is contained in:
Heikki Linnakangas
2014-08-26 16:05:18 +03:00
parent 57ca1d4f01
commit 0076f264b6
8 changed files with 49 additions and 2 deletions

View File

@@ -3486,6 +3486,17 @@ CreateSeqStmt:
n->sequence = $4;
n->options = $5;
n->ownerId = InvalidOid;
n->if_not_exists = false;
$$ = (Node *)n;
}
| CREATE OptTemp SEQUENCE IF_P NOT EXISTS qualified_name OptSeqOptList
{
CreateSeqStmt *n = makeNode(CreateSeqStmt);
$7->relpersistence = $2;
n->sequence = $7;
n->options = $8;
n->ownerId = InvalidOid;
n->if_not_exists = true;
$$ = (Node *)n;
}
;