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 null
 client_id    | smallint  | not null
 booking_time | timestamp | not null
 duration     | float4    | not null
 notes        | text      | not null
Index: bookings_pkey

=#


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl

Reply via email to