pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Grant <grant@conprojan.com.au>
To: pgsql-sql@postgresql.org
Subject: Serials.
Date: Sat, 24 Mar 2001 15:55:09 +1000 (EST)
Message-ID: <Pine.LNX.4.21.0103241549070.21933-100000@webster.conprojan.com.au> (raw)

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

=#




view thread (11+ messages)  latest in thread

Message-ID: <Pine.LNX.4.21.0103241549070.21933-100000@webster.conprojan.com.au>
Permalink:  ../Pine.LNX.4.21.0103241549070.21933-100000@webster.conprojan.com.au/
Also on:    postgresql.org/message-id/Pine.LNX.4.21.0103241549070.21933-100000@webster.conprojan.com.au

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: grant@conprojan.com.au
  Subject: Re: Serials.
  In-Reply-To: <Pine.LNX.4.21.0103241549070.21933-100000@webster.conprojan.com.au>
  References: <Pine.LNX.4.21.0103241549070.21933-100000@webster.conprojan.com.au>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox