pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kranti™ K K Parisa <kranti.parisa@gmail.com>
To: pgsql-admin@postgresql.org
To: pgsql-performance@postgresql.org
Subject: Very Urgent : Sequences Problem
Date: Wed, 19 Nov 2008 21:24:13 +0530
Message-ID: <4478b4ac0811190754n42d9539v4bd42350fac24d1@mail.gmail.com> (raw)

Hi,

I have defined sequence on a table something like this


CREATE SEQUENCE items_unqid_seq
  INCREMENT 1
  MINVALUE 0
  MAXVALUE 9223372036854775807
  START 7659
  CACHE 1;

this is on a table called items. where i have currently the max(unq_id) as
7659.

and in the stored procedure when i am inserting values into the items table
for the unq_id column i am using the sequence as follows:

nextval('items_unqid_seq'::text)


it seems to be working some times. and the sequences are not getting updated
sometime. which is casuing primary key exceptions.

please advise as soon as possible.

is there any trivial problem with sequences in postgresql??

thanks in advance.

-- 
Kranti

view thread (6+ messages)  latest in thread

Message-ID: <4478b4ac0811190754n42d9539v4bd42350fac24d1@mail.gmail.com>
Permalink:  ../4478b4ac0811190754n42d9539v4bd42350fac24d1@mail.gmail.com/
Also on:    postgresql.org/message-id/4478b4ac0811190754n42d9539v4bd42350fac24d1@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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: kranti.parisa@gmail.com, pgsql-admin@postgresql.org
  Subject: Re: Very Urgent : Sequences Problem
  In-Reply-To: <4478b4ac0811190754n42d9539v4bd42350fac24d1@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