From: | "PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #1202: Primary Key constraint not respected |
Date: | 2004-07-28 10:03:53 |
Message-ID: | 20040728100353.57D6CCF4D03@www.postgresql.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 1202
Logged by: Enrico
Email address: carrara(at)pd(dot)infn(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-07-28 13:51:58 | Re: casting strings to multidimensional arrays yields strange results |
Previous Message | Joe Conway | 2004-07-28 04:38:34 | Re: casting strings to multidimensional arrays yields strange |