Received: from sss.pgh.pa.us ([192.204.191.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fB3IWLm11394 for ; Mon, 3 Dec 2001 13:32:22 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id fB3IWFi17874; Mon, 3 Dec 2001 13:32:15 -0500 (EST) To: "Mike Smialek" <_ike_mialek@hotmail.com> cc: pgsql-hackers@postgreSQL.org Subject: Re: case sensititvity bug in foreign keys on cygwin In-reply-to: <9u8bn5$j34$1@news.tht.net> References: <9u8bn5$j34$1@news.tht.net> Comments: In-reply-to "Mike Smialek" <_ike_mialek@hotmail.com> message dated "Fri, 30 Nov 2001 10:23:02 -0600" Date: Mon, 03 Dec 2001 13:32:15 -0500 Message-ID: <17871.1007404335@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200112/51 X-Sequence-Number: 16199 "Mike Smialek" <_ike_mialek@hotmail.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