Re: problem with foreign key

From: Lew <noone(at)lewscanon(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: problem with foreign key
Date: 2010-09-07 00:22:22
Message-ID: i640jg$rk6$1@news.albasani.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Igor Neyman 2010-09-07 12:55:27 Re: fail-safe sql update triggers
Previous Message Ljubomir Erdeljan 2010-09-05 20:49:32 Re: problem with foreign key