Re: BUG #5770: Foreign key violation after insert - Mailing list pgsql-bugs

From Martin Edlman
Subject Re: BUG #5770: Foreign key violation after insert
Date
Msg-id 4CEF7554.3020305@fortech.cz
Whole thread Raw
In response to Re: BUG #5770: Foreign key violation after insert  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Tom,

> "Martin Edlman" <edlman@fortech.cz> writes:
>> I encountered this problem during migration of the database from PgSQL 8.4
>> (where it works) to PgSQL 9.0.1.
>
> For me, this example fails on both 8.4 and 9.0.  It works on both after
> removing the ill-considered quote_literal call here:
>
>>     INSERT INTO tmp.amavis_user (id, email, priority, policy_id)
>>     VALUES (NEW.id, quote_literal(NEW.email), prio, 1);
>
> Perhaps you tried to migrate away from using EXECUTE at the same time
> you were converting to 9.0?

Thank you very much for help. It works now. You're right, I've converted
from EXECUTE to plain INSERT and I forgot to remove quote_literal() and
then I didn't see that this was the problem. I'm glad that the problem was
on my side and not in PgSQL.

Regards, Martin Edlman
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkzvdVQACgkQqmMakYm+VJ96iACeP4PpQuiXBxe7ylAJTHBH4Npl
+n4AoINh4YeayAUcG3Z8wumoROwpx8bj
=qfuC
-----END PGP SIGNATURE-----

pgsql-bugs by date:

Previous
From: "Shafqat Ali"
Date:
Subject: BUG #5771: C:\Program Files\PostgreSQL\8.3\Data is not accessible.
Next
From: tv@fuzzy.cz
Date:
Subject: memory leak in xml2 contrib module