Re: duplicate entries on primary key

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Marcin Gil <marcin(dot)gil(at)audax(dot)com(dot)pl>, pgsql-novice(at)postgresql(dot)org
Subject: Re: duplicate entries on primary key
Date: 2003-12-08 17:38:29
Message-ID: 200312080938.29088.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Marcin,

> Using PHP, Pear::DB i managed to put duplicate entries
> on a primary key column. My PostgreSQL version is 7.4 self compiled,
> running on Slackware 9.1.
>
> Doesn't PK implicate Unique in new version?

Yes. I suspect that your primary key constraint got dropped somehow.

Please examine your table to make sure that the key is still there. In PSQL,
the way to do this is to look at \dt <table_name>.

If you find the key still in place, please post the table definition from PSQL
and the offending rows.

--
Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Stephan Szabo 2003-12-08 18:13:41 Re: duplicate entries on primary key
Previous Message Tom Lane 2003-12-08 16:10:33 Re: Truncation on restore