Re: case sensititvity bug in foreign keys on cygwin - Mailing list pgsql-hackers

From Tom Lane
Subject Re: case sensititvity bug in foreign keys on cygwin
Date
Msg-id 17871.1007404335@sss.pgh.pa.us
Whole thread Raw
In response to case sensititvity bug in foreign keys on cygwin  ("Mike Smialek" <_ike_mialek@hotmail.com>)
List pgsql-hackers
"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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: How many processes running on the server side?
Next
From: Tom Lane
Date:
Subject: Re: Second call for platform testing