From: | Tino Wildenhain <tino(at)wildenhain(dot)de> |
---|---|
To: | Kranti™ K K Parisa <kranti(dot)parisa(at)gmail(dot)com> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: [PERFORM] Very Urgent : Sequences Problem |
Date: | 2008-11-19 16:31:22 |
Message-ID: | 49243F5A.1020300@wildenhain.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-performance |
Hi,
Kranti™ K K Parisa 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.
Thats actually not possible. Sequences are never rolled
back. The only way would be using stale values from
your function call or some other inserts trying to
overwrite or insert into the table twice with the same
id.
> please advise as soon as possible.
>
> is there any trivial problem with sequences in postgresql??
nope.
> thanks in advance.
This is neither admin nor performance related so you better
send such questions to psql-general.
Thank you
Tino
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2008-11-19 16:31:24 | Re: [PERFORM] Very Urgent : Sequences Problem |
Previous Message | Scott Marlowe | 2008-11-19 16:25:15 | Re: move from mysql to postgresql |
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2008-11-19 16:31:24 | Re: [PERFORM] Very Urgent : Sequences Problem |
Previous Message | Kranti™ K K Parisa | 2008-11-19 15:54:13 | Very Urgent : Sequences Problem |