From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mike Smialek <_ike_mialek@hotmail.com>
Cc: pgsql-hackers@postgreSQL.org
Subject: Re: case sensititvity bug in foreign keys on cygwin
Date: Mon, 03 Dec 2001 13:32:15 -0500
Message-ID: <17871.1007404335@sss.pgh.pa.us> (raw)
In-Reply-To: <9u8bn5$j34$1@news.tht.net>
References: <9u8bn5$j34$1@news.tht.net>
"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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, _ike_mialek@hotmail.com, pgsql-hackers@postgreSQL.org
Subject: Re: case sensititvity bug in foreign keys on cygwin
In-Reply-To: <17871.1007404335@sss.pgh.pa.us>
References: <9u8bn5$j34$1@news.tht.net> <17871.1007404335@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox