Tom Lane írta:
Zoltan Boszormenyi <[EMAIL PROTECTED]> writes:
I am working on adding a new column contraint,
namely the GENERATED [ALWAYS | BY DEFAULT ] AS
[ IDENTITY ( sequence_options ) | ( expression )]
Doesn't this still have the issue that we're taking over spec-defined
syntax to represent behavior that does not quite match the spec-defined
semantics? It's not clear to me how closely tied this syntax is to
NEXT VALUE FOR, but if it's got any of the latter's action-at-a-distance
subtleties then I think we ought to leave well enough alone till we have
a solution for that.
regards, tom lane
Sorry for not answering earlier, I was on a holiday.
I read again sections 6.13 and 9.21 about NEXT
VALUE FOR and generation of the next value of
a sequence generator, respectively. If I see it right,
neither of them require the other one.
The IDENTITY COLUMN syntax in section 11.4
only mentions section 9.21. Section 14.8 about
INSERT statement does not even mention it,
only refers to "default clause" in section 11.5.
And that also doesn't say anything about neither
NEXT VALUE FOR nor next value generation of
And I saw comments in the PostgreSQL
documentation that goes like this:
"Standard doesn't specify so we are conforming."
Hint, hint. ;-)
I think the IDENTITY COLUMN (and GENERATED
ALWAYS AS) can stand on its own without
NEXT VALUE FOR.
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not