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 > =?us-ascii?Q?Tr...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 15224 of 17602
Post > Topic >>

=?us-ascii?Q?Trouble=20with=20foreign=20key?=

by otakarek@[EMAIL PROTECTED] Apr 8, 2008 at 05:12 PM

Hi,

there is a problem with foreign key (PG 8.3RC2). Please, look at below. I
don't understand this behavior. Why this INSERT is ending with this error
message. In my opinion, the key is obviously present. Thank you.
--
Otakarek

# INSERT INTO www_es_orderhead_cs(_status,_tmp_ip,_tmp_stamp)
VALUES('n','xx.121.111.31','2f980de9f2297c7902f3415f6537c6be');

ERROR:  insert or update on table "www_es_orderhead_cs" violates foreign
key constraint "www_es_orderhead_cs__tmp_stamp_fkey"
DETAIL:  Key (_tmp_stamp)=(2f980de9f2297c7902f3415f6537c6be) is not
present in table "tmp_stamp".

# SELECT * from tmp_stamp;
       _ip        |              _stamp              |           _expired 
          | _var
------------------+----------------------------------+-------------------------------+------
 xx.121.111.31/32 | 2f980de9f2297c7902f3415f6537c6be | 2008-04-08
17:49:33.193914+02 |
(1 row)

-- 
Sent via pgsql-general mailing list (pgsql-general@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
 




 3 Posts in Topic:
=?us-ascii?Q?Trouble=20with=20foreign=20key?=
otakarek@[EMAIL PROTECTED  2008-04-08 17:12:39 
Re: Trouble with foreign key
hunteke@[EMAIL PROTECTED]  2008-04-09 05:00:08 
Re: Trouble with foreign key
Kyle.Wilcox@[EMAIL PROTEC  2008-04-09 10:04:19 

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:05:04 CST 2008.