From: Martin Edlman <edlman@fortech.cz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #5770: Foreign key violation after insert
Date: Fri, 26 Nov 2010 09:52:36 +0100
Message-ID: <4CEF7554.3020305@fortech.cz> (raw)
In-Reply-To: <14218.1290703969@sss.pgh.pa.us>
References: <201011251252.oAPCqtHw055992@wwwmaster.postgresql.org>
<14218.1290703969@sss.pgh.pa.us>
-----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-----
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: edlman@fortech.cz, tgl@sss.pgh.pa.us
Subject: Re: BUG #5770: Foreign key violation after insert
In-Reply-To: <4CEF7554.3020305@fortech.cz>
References: <201011251252.oAPCqtHw055992@wwwmaster.postgresql.org> <14218.1290703969@sss.pgh.pa.us> <4CEF7554.3020305@fortech.cz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox