Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 1AF9364FC5A for ; Wed, 19 Nov 2008 11:54:23 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 90840-04 for ; Wed, 19 Nov 2008 11:54:15 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.187]) by mail.postgresql.org (Postfix) with ESMTP id 77C1564FCF3 for ; Wed, 19 Nov 2008 11:54:15 -0400 (AST) Received: by ti-out-0910.google.com with SMTP id y8so11501tia.5 for ; Wed, 19 Nov 2008 07:54:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=TlTm8lb7pQSjXw42E6ZFkgkcGC/QPhm0D3jWPNtwciY=; b=mr2HUwyRH/o9XVCjuHOsJvT/Zl6bivUx4CzpE736oXxYVoU6zCouyaW02IElRMjn+q 4NnO6f95RvxtgPZXZ5SfY8CR9pZ48+09IzajL6GaRp0Brng3ubkL/KMuEvDp1MeLnwov GBJoexvqeFOeQwK/SgsHW1emA/AjGMlW3pVZw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=dTz0/nAFF36sJdqBctBXosdGM/74e5XJKvQMaqMgPRRIALrd9EgJRn5qcBh8TD3D8i sCgFyqbwqNypSyrBszSIXC2RiFVnzkvGBmPvdyZE4ttsOMty23RUwxEUw0yx4dmmB1O0 h/7mS+9MPSM6lKX+pyVWhNp43yNIIB+rUYYRM= Received: by 10.110.69.5 with SMTP id r5mr1651459tia.36.1227110053155; Wed, 19 Nov 2008 07:54:13 -0800 (PST) Received: by 10.110.49.5 with HTTP; Wed, 19 Nov 2008 07:54:13 -0800 (PST) Message-ID: <4478b4ac0811190754n42d9539v4bd42350fac24d1@mail.gmail.com> Date: Wed, 19 Nov 2008 21:24:13 +0530 From: "=?WINDOWS-1252?Q?Kranti=99_K_K_Parisa?=" To: pgsql-admin@postgresql.org, pgsql-performance@postgresql.org Subject: Very Urgent : Sequences Problem MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_53812_14208477.1227110053152" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200811/110 X-Sequence-Number: 30764 ------=_Part_53812_14208477.1227110053152 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 ------=_Part_53812_14208477.1227110053152 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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
           
------=_Part_53812_14208477.1227110053152--