pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedDuplicate records in a table inspite of a primary key
5+ messages / 5 participants
[nested] [flat]
* Duplicate records in a table inspite of a primary key
@ 2008-08-12 06:47 subamathy <subamathy@gmail.com>
2008-08-12 13:56 ` Re: Duplicate records in a table inspite of a primary key Rafael Domiciano <rafael.domiciano@gmail.com>
2008-08-12 14:05 ` Re: Duplicate records in a table inspite of a primary key Julius Tuskenis <julius@nsoft.lt>
2008-08-12 14:27 ` Re: Duplicate records in a table inspite of a primary key Robert Treat <xzilla@users.sourceforge.net>
0 siblings, 3 replies; 5+ messages in thread
From: subamathy @ 2008-08-12 06:47 UTC (permalink / raw)
To: pgsql-admin
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.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Duplicate records in a table inspite of a primary key
2008-08-12 06:47 Duplicate records in a table inspite of a primary key subamathy <subamathy@gmail.com>
@ 2008-08-12 13:56 ` Rafael Domiciano <rafael.domiciano@gmail.com>
2 siblings, 0 replies; 5+ messages in thread
From: Rafael Domiciano @ 2008-08-12 13:56 UTC (permalink / raw)
To: subamathy <subamathy@gmail.com>; +Cc: pgsql-admin
Did you verified if isn't the software that is doing this?
2008/8/12 subamathy <subamathy@gmail.com>
> 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.
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Duplicate records in a table inspite of a primary key
2008-08-12 06:47 Duplicate records in a table inspite of a primary key subamathy <subamathy@gmail.com>
@ 2008-08-12 14:05 ` Julius Tuskenis <julius@nsoft.lt>
2 siblings, 0 replies; 5+ messages in thread
From: Julius Tuskenis @ 2008-08-12 14:05 UTC (permalink / raw)
To: subamathy <subamathy@gmail.com>; +Cc: pgsql-admin
Hello,
please send a sql script that was used to create this table. If you use
pgAdmin you can copy the sql from it. By saying dublicate records you
mean identical? That is there are records with the same user_id value?
subamathy rašė:
> 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.
>
--
Julius Tuskenis
Programavimo skyriaus vadovas
UAB nSoft
mob. +37068233050
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Duplicate records in a table inspite of a primary key
2008-08-12 06:47 Duplicate records in a table inspite of a primary key subamathy <subamathy@gmail.com>
@ 2008-08-12 14:27 ` Robert Treat <xzilla@users.sourceforge.net>
2008-08-12 14:31 ` Re: Duplicate records in a table inspite of a primary key Rex Mabry <rexmabry@yahoo.com>
2 siblings, 1 reply; 5+ messages in thread
From: Robert Treat @ 2008-08-12 14:27 UTC (permalink / raw)
To: pgsql-admin; +Cc: subamathy <subamathy@gmail.com>
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
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Duplicate records in a table inspite of a primary key
2008-08-12 06:47 Duplicate records in a table inspite of a primary key subamathy <subamathy@gmail.com>
2008-08-12 14:27 ` Re: Duplicate records in a table inspite of a primary key Robert Treat <xzilla@users.sourceforge.net>
@ 2008-08-12 14:31 ` Rex Mabry <rexmabry@yahoo.com>
0 siblings, 0 replies; 5+ messages in thread
From: Rex Mabry @ 2008-08-12 14:31 UTC (permalink / raw)
To: pgsql-admin; +Cc: subamathy <subamathy@gmail.com>
You have to be careful when using characters as your PK. A trailing space could give the appearance of duplicate keys.
Example:
"user1"
"user1 " (This one has a space at the end)
--- On Tue, 8/12/08, Robert Treat <xzilla@users.sourceforge.net> wrote:
From: Robert Treat <xzilla@users.sourceforge.net>
Subject: Re: [ADMIN] Duplicate records in a table inspite of a primary key
To: pgsql-admin@postgresql.org
Cc: "subamathy" <subamathy@gmail.com>
Date: Tuesday, August 12, 2008, 9:27 AM
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
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2008-08-12 14:31 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-08-12 06:47 Duplicate records in a table inspite of a primary key subamathy <subamathy@gmail.com>
2008-08-12 13:56 ` Rafael Domiciano <rafael.domiciano@gmail.com>
2008-08-12 14:05 ` Julius Tuskenis <julius@nsoft.lt>
2008-08-12 14:27 ` Robert Treat <xzilla@users.sourceforge.net>
2008-08-12 14:31 ` Rex Mabry <rexmabry@yahoo.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox