Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql General > Re: Trouble wit...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 15225 of 17602
Post > Topic >>

Re: Trouble with foreign key

by ludwig@[EMAIL PROTECTED] Apr 9, 2008 at 11:35 AM

<span style="font-family: Verdana"><pre><p>Hi,&nbsp;</p><p>what&#39;s the
result of </p><p>&nbsp;SELECT * from tmp_stamp where _stamp =
&#39;2f980de9f2297c7902f3415f6537c6be&#39;;</p><p>?</p><p>Perhaps
different fieldtypes (f. e. VARCHAR in table www_es_orderhead_cs versus
CHAR(n) in Table _stamp filled up with
blanks)?</p><p>&nbsp;</p><p>Ludwig</p><p>&nbsp;</p><p>&nbsp;</p><p>Hi,<br
/><br />there is a problem with foreign key (PG 8.3RC2). Please, look at
below. I don&#39;t understand this behavior. Why this INSERT is ending
with this error message. In my opinion, the key is obviously present.
Thank you.<br />--<br />Otakarek<br /><br /># INSERT INTO
www_es_orderhead_cs(_status,_tmp_ip,_tmp_stamp)
VALUES(&#39;n&#39;,&#39;xx.121.111.31&#39;,&#39;2f980de9f2297c7902f3415f6537c6be&#39;);<br
/><br />ERROR:  insert or update on table &quot;www_es_orderhead_cs&quot;
violates foreign key constraint
&quot;www_es_orderhead_cs__tmp_stamp_fkey&quot;<br />DETAIL:  Key
(_tmp_stamp)=(2f980de9f2297c7902f3415f6537c6be) is not present in table
&quot;tmp_stamp&quot;.<br /><br /># SELECT * from tmp_stamp;<br />      
_ip        |              _stamp              |           _expired        
   | _var<br
/>------------------+----------------------------------+-------------------------------+------<br
/> xx.121.111.31/32 | 2f980de9f2297c7902f3415f6537c6be | 2008-04-08
17:49:33.193914+02 |<br />(1 row)<br /><br />-- <br />Sent via
pgsql-general mailing list (pgsql-general@[EMAIL PROTECTED]
)<br />To make
changes to your subscription:<br /><a target="_blank"
href="/xml/deref?link=http%3A%2F%2Fwww.postgresql.org%2Fmailpref%2Fpgsql-general">http://www.postgresql.org/mailpref/pgsql-general</a></p></pre></span>
 




 1 Posts in Topic:
Re: Trouble with foreign key
ludwig@[EMAIL PROTECTED]   2008-04-09 11:35:35 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 19:59:21 CST 2008.