Re: Serial not so unique? - Mailing list pgsql-general

From Stephen Robert Norris
Subject Re: Serial not so unique?
Date
Msg-id 20010819131800.F16924@sunhill.commsecure.com.au
Whole thread Raw
In response to Re: Serial not so unique?  (Justin Clift <justin@postgresql.org>)
List pgsql-general
On Sun, Aug 19, 2001 at 12:42:36PM +1000, Justin Clift wrote:
> Hi Stephen,
>
> That's weird behaviour.  If you'd manually created the sequence like
> this :
>
> CREATE SEQUENCE foo_seq MINVALUE 4 MAXVALUE 101 CYCLE
>
> Then referenced it as the default like this :
>
> CREATE TABLE bar (idnum integer UNIQUE DEFAULT nextval('foo_seq') NOT
> NULL, otherstuff varchar(20));
>
> That would explain the wrapping around behaviour, but not when the field
> is a SERIAL type.
>
> :(
>
> + Justin Clift

Indeed. What's worse is that the first time around it went from  1 -> 101.

    Stephen

pgsql-general by date:

Previous
From: Justin Clift
Date:
Subject: Re: Serial not so unique?
Next
From: Stephen Robert Norris
Date:
Subject: Re: Serial not so unique?