mirror of
https://github.com/postgres/postgres.git
synced 2025-07-09 22:41:56 +03:00
Implement IF NOT EXISTS for CREATE SEQUENCE.
Fabrízio de Royes Mello
This commit is contained in:
doc/src/sgml/ref
src
backend
include
nodes
test
regress
@ -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;
|
||||
}
|
||||
;
|
||||
|
Reference in New Issue
Block a user