Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 6457F64FF9E for ; Tue, 12 Aug 2008 11:28:19 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 80131-08 for ; Tue, 12 Aug 2008 11:28:07 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from vms173003pub.verizon.net (vms173003pub.verizon.net [206.46.173.3]) by postgresql.org (Postfix) with ESMTP id 483F664FF86 for ; Tue, 12 Aug 2008 11:28:13 -0300 (ADT) Received: from ridley.home ([71.179.187.2]) by vms173003.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0K5H009J7S6I06KC@vms173003.mailsrvcs.net> for pgsql-admin@postgresql.org; Tue, 12 Aug 2008 09:27:54 -0500 (CDT) Date: Tue, 12 Aug 2008 10:27:53 -0400 From: Robert Treat Subject: Re: Duplicate records in a table inspite of a primary key In-reply-to: To: pgsql-admin@postgresql.org Cc: subamathy Message-id: <200808121027.53405.xzilla@users.sourceforge.net> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-15 Content-transfer-encoding: 7bit Content-disposition: inline References: User-Agent: KMail/1.9.9 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200808/47 X-Sequence-Number: 29892 On Tuesday 12 August 2008 02:47:58 subamathy wrote: > Hi, > We are having problems resulting from users being able to create duplicate > records > in table. > > Below is the description of the table > Column | Type | Modifiers > -----------------------+------------------------+----------- > user_id | character varying(128) | not null > person_email_required | numeric(5,0) | > wddx_data | text | > proxy_id | character varying(128) | > email_to | character varying(6) | > password | character varying(60) | > user_name | character varying(64) | > language_preference | character varying(20) | > enable_autosearch | character varying(6) | > country_id | character varying(16) | > Indexes: > "i_personalise" PRIMARY KEY, btree (user_id) > "i_personalise_proxy_id" btree (proxy_id) > "i_personalise_user_id" btree (user_id) > > > database version: PostgreSQL 8.0.1 > > i_personalise- index > > conn type: Primary (constriant Type) > condeferrable: False > conkey: 1 (column which has constraint) > > Could you please help me out in finding the reason for such dupicate > records existing > > > Could you pls help me out in finding the reson for duplicate records being > inserted. I'm pretty sure that between 8.0.1 and 8.0.17 there are a couple of bugfixes related to duplicate rows with pk scenarios, you should probably take some time to upgrade before you spend too much time digging into this (make sure to read all of the release notes for those versions in between, i'm also thinking there are some special instructions that might need to be done somewhere in there) -- Robert Treat Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL