Re: problem with foreign key - Mailing list pgsql-admin

From Lew
Subject Re: problem with foreign key
Date
Msg-id i640jg$rk6$1@news.albasani.net
Whole thread Raw
In response to Re: problem with foreign key  (Ljubomir Erdeljan <ljubomir.erdeljan@chello.at>)
List pgsql-admin
Please do not top-post.

Bèrto ëd Sèra wrote:
>> An immediate question: did you check that Key (docuuserid)=(8415) is
>> actually present in table "trade"?

Ljubomir Erdeljan wrote:
 >   This relate to different column names
 > docuuserid is column in porder1 but relate to tradeid in trade.

You missed the point.  Did you check that the key is present in "trade"?

IOW, is there a row in "trade" with "tradeid" equal to 8415?  If not, you
cannot create the foreign key because the item in "porder1" cannot point to it.

--
Lew

pgsql-admin by date:

Previous
From: Ljubomir Erdeljan
Date:
Subject: Re: problem with foreign key
Next
From: "Igor Neyman"
Date:
Subject: Re: fail-safe sql update triggers