Re: spurious "UNIQUE constraint matching given keys for referenced table" error - Mailing list pgsql-bugs

From Tom Lane
Subject Re: spurious "UNIQUE constraint matching given keys for referenced table" error
Date
Msg-id 14719.1034691203@sss.pgh.pa.us
Whole thread Raw
In response to spurious "UNIQUE constraint matching given keys for referenced table" error  ("Mathew Frank" <mathewfrank@qushi.com>)
List pgsql-bugs
"Mathew Frank" <mathewfrank@qushi.com> writes:
> UNIQUE constraint matching given keys for referenced table "price_lists" not
> found

As of CVS tip your example gives

ERROR:  ALTER TABLE: column "s_price_list_id" referenced in foreign key constraint does not exist

which appears correct (you misspelled the column name).

7.2 does foreign key validity checking in a funny order that causes it
to produce the other error message first.  While not incorrect, it's
sure misleading :-(

            regards, tom lane

pgsql-bugs by date:

Previous
From: ftm.van.vugt@foxi.nl
Date:
Subject: multiple exception definition in pg_type.h -> error compiling postgres support in Qt with gcc v3.2 (SuSE 8.1)
Next
From: Tom Lane
Date:
Subject: Re: multiple exception definition in pg_type.h -> error compiling postgres support in Qt with gcc v3.2 (SuSE 8.1)