From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Mike Smialek" <_ike_mialek(at)hotmail(dot)com> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: case sensititvity bug in foreign keys on cygwin |
Date: | 2001-12-03 18:32:15 |
Message-ID: | 17871.1007404335@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-bugs pgsql-hackers |
"Mike Smialek" <_ike_mialek(at)hotmail(dot)com> writes:
> Capitalizing just the foreign column name fails with what seems to be an
> incorrect error:
> -- Table: significance
> CREATE TABLE "significance" (
> "Significanceid" int4 NOT NULL,
> "desc" varchar(255),
> CONSTRAINT "pk_significance" PRIMARY KEY ("Significanceid"));
> -- Table: primaryword
> CREATE TABLE "primaryword" (
> "exerciseid" int4 NOT NULL,
> "significanceid" int4 NOT NULL,
> CONSTRAINT "pk_primaryword" PRIMARY KEY ("exerciseid"),
> CONSTRAINT "fk_primaryword_significance" FOREIGN KEY
> (significanceid) REFERENCES "significance" (Significanceid) );
^^^^^^^^^^^^^^
> Fails with error
> Description: Error while executing the query;
> Error: UNIQUE constraint matching given keys for refernced table
> "significance" not found
I see no bug here. You didn't quote the foreign key column name, thus
it got folded to lowercase.
It might be nice if the error message explicitly identified the key
columns being sought, though.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | jason | 2001-12-03 19:39:12 | adding primary keys |
Previous Message | Chad R. Larson | 2001-12-03 18:16:54 | Re: postgres on WinNT and IIS |
From | Date | Subject | |
---|---|---|---|
Next Message | pgsql-bugs | 2001-12-04 00:12:11 | Bug #529: UPDATE fails after an index is changed |
Previous Message | Tom Lane | 2001-12-03 18:28:35 | Re: SQL Query Problem |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-12-03 18:36:27 | Re: Second call for platform testing |
Previous Message | Tom Lane | 2001-12-03 18:31:23 | Re: Problem (bug?) with like |