pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pandurangan R S <pandurangan.r.s@gmail.com>
To: Jean-Christophe Roux <jcxxr@yahoo.com>
Cc: pgsql-general@postgresql.org
Subject: Re:
Date: Sat, 11 Feb 2006 19:24:58 +0530
Message-ID: <5e744e3d0602110554w50d74c28ua0698ecb3fdb46b0@mail.gmail.com> (raw)
In-Reply-To: <20060210174254.50639.qmail@web35307.mail.mud.yahoo.com>
References: <20060210174254.50639.qmail@web35307.mail.mud.yahoo.com>

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@yahoo.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
>
>



view thread (2+ messages)

Message-ID: <5e744e3d0602110554w50d74c28ua0698ecb3fdb46b0@mail.gmail.com>
Permalink:  ../5e744e3d0602110554w50d74c28ua0698ecb3fdb46b0@mail.gmail.com/
Also on:    postgresql.org/message-id/5e744e3d0602110554w50d74c28ua0698ecb3fdb46b0@mail.gmail.com

 · 

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-general@postgresql.org
  Cc: pandurangan.r.s@gmail.com, jcxxr@yahoo.com
  Subject: Re: 
  In-Reply-To: <5e744e3d0602110554w50d74c28ua0698ecb3fdb46b0@mail.gmail.com>
  References: <20060210174254.50639.qmail@web35307.mail.mud.yahoo.com> <5e744e3d0602110554w50d74c28ua0698ecb3fdb46b0@mail.gmail.com>

* 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