| From: | Martin Edlman <edlman(at)fortech(dot)cz> | 
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
| Cc: | pgsql-bugs(at)postgresql(dot)org | 
| Subject: | Re: BUG #5770: Foreign key violation after insert | 
| Date: | 2010-11-26 08:52:36 | 
| Message-ID: | 4CEF7554.3020305@fortech.cz | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-bugs | 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Tom,
> "Martin Edlman" <edlman(at)fortech(dot)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-----
| From | Date | Subject | |
|---|---|---|---|
| Next Message | tv | 2010-11-26 12:54:19 | memory leak in xml2 contrib module | 
| Previous Message | Fujii Masao | 2010-11-26 04:25:19 | Re: Re: [BUGS] BUG #5650: Postgres service showing as stopped when in fact it is running |