Re: SERIAL type feature request

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Zoltan Boszormenyi <zboszor(at)dunaweb(dot)hu>
Cc: Jan Wieck <JanWieck(at)Yahoo(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: SERIAL type feature request
Date: 2005-12-04 23:22:54
Message-ID: 43937A4E.2020005@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2005-12-05 00:50:18 Re: SERIAL type feature request
Previous Message Andrew Dunstan 2005-12-04 23:08:09 Re: [PATCHES] snprintf() argument reordering not working