mirror of
https://github.com/postgres/postgres.git
synced 2025-06-25 01:02:05 +03:00
Identity columns
This is the SQL standard-conforming variant of PostgreSQL's serial columns. It fixes a few usability issues that serial columns have: - CREATE TABLE / LIKE copies default but refers to same sequence - cannot add/drop serialness with ALTER TABLE - dropping default does not drop sequence - need to grant separate privileges to sequence - other slight weirdnesses because serial is some kind of special macro Reviewed-by: Vitaly Burovoy <vitaly.burovoy@gmail.com>
This commit is contained in:
@ -144,6 +144,7 @@ typedef enum ExprEvalOp
|
||||
EEOP_NULLIF,
|
||||
EEOP_SQLVALUEFUNCTION,
|
||||
EEOP_CURRENTOFEXPR,
|
||||
EEOP_NEXTVALUEEXPR,
|
||||
EEOP_ARRAYEXPR,
|
||||
EEOP_ARRAYCOERCE,
|
||||
EEOP_ROW,
|
||||
@ -361,6 +362,13 @@ typedef struct ExprEvalStep
|
||||
SQLValueFunction *svf;
|
||||
} sqlvaluefunction;
|
||||
|
||||
/* for EEOP_NEXTVALUEXPR */
|
||||
struct
|
||||
{
|
||||
Oid seqid;
|
||||
Oid seqtypid;
|
||||
} nextvalueexpr;
|
||||
|
||||
/* for EEOP_ARRAYEXPR */
|
||||
struct
|
||||
{
|
||||
|
Reference in New Issue
Block a user