dbTalk Databases Forums  

duplicate entries on primary key

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss duplicate entries on primary key in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Marcin Gil
 
Posts: n/a

Default duplicate entries on primary key - 12-08-2003 , 06:41 AM






Hi!
Using PHP, Pear:B 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?
--
Marcin Gil
marcin.gil @ audax.com.pl, tel. 694972082
OIS Audax Sp. z o.o., ul. Barlickiego 4, 97-200 Tomaszów Mazowiecki
tel/fax (44) 7247530, 7244401

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: duplicate entries on primary key - 12-08-2003 , 10:06 AM






Quote:
Using PHP, Pear:B i managed to put duplicate entries
on a primary key column.
Can you show us a reproducible test case?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Reply With Quote
  #3  
Old   
Josh Berkus
 
Posts: n/a

Default Re: duplicate entries on primary key - 12-08-2003 , 11:38 AM



Marcin,

Quote:
Using PHP, Pear:B 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

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly



Reply With Quote
  #4  
Old   
Stephan Szabo
 
Posts: n/a

Default Re: duplicate entries on primary key - 12-08-2003 , 12:13 PM




On Mon, 8 Dec 2003, Marcin Gil wrote:

Quote:
Using PHP, Pear:B 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?
Also note in addition to other messages, pk/unique and inheritance have
issues right now. If you're using inheritance you may not have the
constraints you think you do since pk/unique constraints are not
inherited.

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly



Reply With Quote
  #5  
Old   
Marcin Gil
 
Posts: n/a

Default Re: duplicate entries on primary key - 12-16-2003 , 02:43 AM



Sorry for not answering, but I've been cut from the net.
I can't send you my database, because since then I dropped it
and recreated.
As my thought it has something to do with triggers. While running
a live database I've created/dropped a trigger function a few times
that operated on that specific table.

As far as I remember pk constraint was there.
I wish I could help you more...
--
Marcin Gil
marcin.gil @ audax.com.pl, tel. 694972082
OIS Audax Sp. z o.o., ul. Barlickiego 4, 97-200 Tomaszów Mazowiecki
tel/fax (44) 7247530, 7244401

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.