Re: Serial not so unique?

Поиск
Список
Период
Сортировка
От Stephen Robert Norris
Тема Re: Serial not so unique?
Дата
Msg-id 20010819131800.F16924@sunhill.commsecure.com.au
обсуждение исходный текст
Ответ на Re: Serial not so unique?  (Justin Clift <justin@postgresql.org>)
Список 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 по дате отправления:

Предыдущее
От: Justin Clift
Дата:
Сообщение: Re: Serial not so unique?
Следующее
От: Stephen Robert Norris
Дата:
Сообщение: Re: Serial not so unique?