Re: BUG #5770: Foreign key violation after insert

Поиск
Список
Период
Сортировка
От Martin Edlman
Тема Re: BUG #5770: Foreign key violation after insert
Дата
Msg-id 4CEF7554.3020305@fortech.cz
обсуждение исходный текст
Ответ на Re: BUG #5770: Foreign key violation after insert  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: "Shafqat Ali"
Дата:
Сообщение: BUG #5771: C:\Program Files\PostgreSQL\8.3\Data is not accessible.
Следующее
От: tv@fuzzy.cz
Дата:
Сообщение: memory leak in xml2 contrib module