Re:

From: Pandurangan R S <pandurangan(dot)r(dot)s(at)gmail(dot)com>
To: Jean-Christophe Roux <jcxxr(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re:
Date: 2006-02-11 13:54:58
Message-ID: 5e744e3d0602110554w50d74c28ua0698ecb3fdb46b0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

try using CACHE 1 (which is default) in the sequence defintion.

http://www.postgresql.org/docs/8.1/static/sql-createsequence.html

On 2/10/06, Jean-Christophe Roux <jcxxr(at)yahoo(dot)com> wrote:
> Hello,
> I have a table with and id field (primary key) which default value is the
> result of a sequence (increment explicitly set to 1).
> To my surprise, the real increment on insert is the total number of rows of
> the table. For instance, with 41 rows and a sequence last_value of 1141, the
> next insert row will have a value of 1182. It is not a big problem but I
> don't like skipping and wasting values in a sequence. Also, I'd like to
> understand what's going on!
> If someone could give me a clue that wold be greatly appreciated
> thanks
> JC
>
>
>
> ________________________________
>
> What are the most popular cars? Find out at Yahoo! Autos
>
>

In response to

  • at 2006-02-10 17:42:54 from Jean-Christophe Roux

Browse pgsql-general by date

  From Date Subject
Next Message Jean-Christophe Roux 2006-02-11 14:06:21 Re: Sequence skipping values
Previous Message Craig 2006-02-11 12:45:51 Re: Adding pl/perl support