Serials.

Поиск
Список
Период
Сортировка
От Grant
Тема Serials.
Дата
Msg-id Pine.LNX.4.21.0103241549070.21933-100000@webster.conprojan.com.au
обсуждение исходный текст
Ответы Re: Serials.  (darcy@druid.net (D'Arcy J.M. Cain))
Re: Serials.  (Mathijs Brands <mathijs@ilse.nl>)
Re: Serials.  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-sql
Please see below for my table schema. I have two questions.

(1) Why is a sequence limited to 2147483647, it seems very small?

(2) If I reset the sequence, then try another insert. It will not insert
anything until it cycles through all sequences and finds an unused one. It
will give the following error each time it tries to insert a row with a
used sequence:

PostgreSQL query failed: ERROR: Cannot insert a duplicate key into unique
index releases_pkey 

How can I possibly get around this issue so that I can be sure to always
have a free id without getting the error above?

Thankyou.

-- TABLE --

=# \d bookings                              Table "bookings" Attribute   |   Type    |                     Modifier
--------------+-----------+---------------------------------------------------id           | integer   | not null
default
nextval('bookings_id_seq'::text)added        | timestamp | not nullclient_id    | smallint  | not nullbooking_time |
timestamp| not nullduration     | float4    | not nullnotes        | text      | not null
 
Index: bookings_pkey

=#



В списке pgsql-sql по дате отправления:

Предыдущее
От: "datactrl"
Дата:
Сообщение: how do I check if a temporary table exists?
Следующее
От: Richard H
Дата:
Сообщение: Re: rows equal