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
=#