Re: spurious "UNIQUE constraint matching given keys for referenced table" error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Mathew Frank" <mathewfrank(at)qushi(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: spurious "UNIQUE constraint matching given keys for referenced table" error
Date: 2002-10-15 14:13:23
Message-ID: 14719.1034691203@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Mathew Frank" <mathewfrank(at)qushi(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2002-10-15 17:39:16 Re: multiple exception definition in pg_type.h -> error compiling postgres support in Qt with gcc v3.2 (SuSE 8.1)
Previous Message ftm.van.vugt 2002-10-15 13:54:04 multiple exception definition in pg_type.h -> error compiling postgres support in Qt with gcc v3.2 (SuSE 8.1)