dbTalk Databases Forums  

[BUGS] BUG #1202: Primary Key constraint not respected

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #1202: Primary Key constraint not respected in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
PostgreSQL Bugs List
 
Posts: n/a

Default [BUGS] BUG #1202: Primary Key constraint not respected - 07-28-2004 , 05:12 AM







The following bug has been logged online:

Bug reference: 1202
Logged by: Enrico

Email address: carrara (AT) pd (DOT) infn.it

PostgreSQL version: 7.4

Operating system: linux Debian Sarge

Description: Primary Key constraint not respected

Details:

Hi, I'm using version 7.4.2.
I created this table (italian text, sorry):

prova=> \d crate
Tabella "public.crate"
Colonna | Tipo | Modificatori
----------+---------+---------------------
code | integer | not null
location | integer | default 1
capacity | integer | not null default 70
Indici:
"code" chiave primaria, btree (code)

("code" is primay key, without oids)

I entered twice the same "code" and I got no error, as you can see:

prova=> select * from crate where code > 500;
code | location | capacity
------+----------+----------
503 | 1 | 48
503 | 1 | 48
501 | 1 | 1
502 | 1 | 1
504 | 1 | 48
(5 righe)

It happened only once, now it correctly says:

prova=> insert into crate (code) values (503);
ERROR: duplicate key violates unique constraint "code"

Thanks.
-E-nrico


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

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.