X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 7B99B11F655D for ; Thu, 20 Apr 2006 18:45:14 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: 1.358 X-Spam-Level: * X-Spam-Status: No, score=1.358 required=5 tests=[DNS_FROM_RFC_ABUSE=0.479, DNS_FROM_RFC_WHOIS=0.879] Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id dSsy2M6+Lytm for ; Thu, 20 Apr 2006 18:45:07 -0300 (ADT) X-Greylist: delayed 00:06:34.198318 by SQLgrey- Received: from web53510.mail.yahoo.com (web53510.mail.yahoo.com [206.190.37.71]) by postgresql.org (Postfix) with SMTP id BF23C11F654E for ; Thu, 20 Apr 2006 18:45:08 -0300 (ADT) Received: (qmail 49335 invoked by uid 60001); 20 Apr 2006 21:38:29 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=6p0YaNOAWk1YXnK/6CfIUsm1J3U9ZKSvXRta6qdpkNJDq2MUwOOQJxkjWBS0K7FmCHMHs/7X7ziCHy+P1mOt+LdlMTEbPxSBlvrpZSVQjKz0W3Hplcfa/4rwPdcKELNjbhSZnAok1d6RmaKN2e7YTxo2XrD5xVfus1kCUwkaxHE= ; Message-ID: <20060420213829.49332.qmail@web53510.mail.yahoo.com> Received: from [198.54.202.130] by web53510.mail.yahoo.com via HTTP; Thu, 20 Apr 2006 14:38:29 PDT Date: Thu, 20 Apr 2006 14:38:29 -0700 (PDT) From: Allan Kamau Subject: Re: Error inserting row on unique key To: Benjamin Krajmalnik Cc: pgsql-admin@postgresql.org In-Reply-To: <26407.1145556088@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Archive-Number: 200604/201 X-Sequence-Number: 21370 Benjamin, Are you sure the sequence is the only source of the values of the primary key field of all records in this table, that no records may have been inserted using primary key field values generated from sources other than the sequence. Allan. --- Tom Lane wrote: > "Benjamin Krajmalnik" writes: > > I have a large table which uses a sequence for > column which is defined as the primary key. > > Our systems is a real time data acquisition > system, so we have "insert" statements going through > it wrapped inside stored procedure. > > > Every once in a while I get an inserio error on a > violation of a unique constraint on the primary key. > > Let's see that stored procedure ... > > regards, tom lane > > ---------------------------(end of > broadcast)--------------------------- > TIP 1: if posting/reading through Usenet, please > send an appropriate > subscribe-nomail command to > majordomo@postgresql.org so that your > message can get through to the mailing list > cleanly > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com