Re: SERIAL type feature request - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: SERIAL type feature request
Date
Msg-id 43937A4E.2020005@dunslane.net
Whole thread Raw
In response to Re: SERIAL type feature request  (Zoltan Boszormenyi <zboszor@dunaweb.hu>)
List pgsql-hackers

Zoltan Boszormenyi wrote:

>
>
> I found this in the SQL2003 draft:
>
> "
> 4.14.7 Identity columns
>
> ... An identity column has a start value, an increment, a maximum 
> value, a minimum value,
> and a cycle option. ...



And that section says nothing at all about using 0 as a magic value. All 
it says is:

"Let IC be the identity column of BT. When a row R is presented for 
insertion
into BT, if R does not contain a column corresponding to IC, then the 
value V for IC in the row inserted into
BT is obtained by applying the General Rules of Subclause 9.21, 
“Generation of the next value of a sequence
generator”, to SG."

Which is pretty much what we do.

We can't implement everybody's way of doing serial cols, because they 
are simply not all compatible. Next someone will be asking us to do it 
MySQL's way (gods forbid).

cheers

andrew


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: [PATCHES] snprintf() argument reordering not working
Next
From: Jan Wieck
Date:
Subject: Re: SERIAL type feature request