Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group