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

From Tom Lane
Subject Re: BUG #5770: Foreign key violation after insert
Date
Msg-id 14218.1290703969@sss.pgh.pa.us
Whole thread Raw
In response to BUG #5770: Foreign key violation after insert  ("Martin Edlman" <edlman@fortech.cz>)
Responses Re: BUG #5770: Foreign key violation after insert
List pgsql-bugs
"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?

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #5769: Problem with SPI_getvalue
Next
From: Craig Ringer
Date:
Subject: Re: BUG #5767: Memory Leak