Serials jumping

From: "Matt A(dot)" <survivedsushi(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Serials jumping
Date: 2005-08-26 09:01:50
Message-ID: 20050826090150.67833.qmail@web35212.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a serial column on a test box DB. I'm
using "select nextval('some_seq') as id" to insert a
id in sequence. It doesn't return the next value but
at least 4 or so (random) ahead of the current
value. Is this to be expected?

Is this the most efficient way to retreive an id value
for insert a row then insert the resulting row into
the related tables?

Is there a more efficient/proper way? I would like all
my records to increment by 1 if possible. I'd be very
grateful to read your opinion.

Thank you.


____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2005-08-26 09:19:07 Re: Serials jumping
Previous Message Matt A. 2005-08-26 08:57:40 Re: Altering built-in functions cast