duplicate primary key entries?

From: Baldur Norddahl <bbn-pgsql(dot)general(at)clansoft(dot)dk>
To: pgsql-general(at)postgresql(dot)org
Subject: duplicate primary key entries?
Date: 2003-11-25 11:22:29
Message-ID: 1069759349.3fc33b75bb094@dark.clansoft.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I just noticed something bad in our database:

webshop=# select oid,* from content_loc where id=20488;
oid | id | locale | name
---------+-------+--------+--------------
9781056 | 20488 | any | Rise Part II
9781058 | 20488 | any | Rise Part II
(2 rows)

webshop=# \d content_loc
Table "public.content_loc"
Column | Type | Modifiers
--------+---------+-----------
id | integer | not null
locale | text | not null
name | text |
Indexes: content_loc_pkey primary key btree (id, locale)
Foreign Key constraints: $1 FOREIGN KEY (id) REFERENCES content(id) ON UPDATE
CASCADE ON DELETE CASCADE,
$2 FOREIGN KEY (locale) REFERENCES languages(locale) ON
UPDATE CASCADE ON DELETE CASCADE

Apparently there are two rows with identical primary keys which should not be
possible. Is this a know problem? Can I expect everything to be ok if I just
delete the extra entry?

I am using the debian packages of postgresql 7.3.4-9.

Thanks,

Baldur

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2003-11-25 11:45:36 Re: duplicate primary key entries?
Previous Message Gerwin Philippo 2003-11-25 10:46:11 Can I get rid of the schemas?