Skip site navigation (1) Skip section navigation (2)

Re: [PERFORM] Very Urgent : Sequences Problem

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: Kranti™ K K Parisa <kranti(dot)parisa(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org, pgsql-performance(at)postgresql(dot)org
Subject: Re: [PERFORM] Very Urgent : Sequences Problem
Date: 2008-11-19 16:40:52
Message-ID: b42b73150811190840s1b92bcc7tc45be2fe6863bfe2@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-performance
On Wed, Nov 19, 2008 at 10:54 AM, Kranti™ K K Parisa
<kranti(dot)parisa(at)gmail(dot)com> wrote:
> 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??

no (at least none that I know of).

maybe if you posted the source of your procedure?  I bet your error is
coming form some other source.

merlin

In response to

Responses

pgsql-performance by date

Next:From: tvDate: 2008-11-19 16:53:09
Subject: Re: [PERFORM] Very Urgent : Sequences Problem
Previous:From: Josh BerkusDate: 2008-11-19 16:31:24
Subject: Re: [PERFORM] Very Urgent : Sequences Problem

pgsql-admin by date

Next:From: tvDate: 2008-11-19 16:53:09
Subject: Re: [PERFORM] Very Urgent : Sequences Problem
Previous:From: Josh BerkusDate: 2008-11-19 16:31:24
Subject: Re: [PERFORM] Very Urgent : Sequences Problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group