Re: BUG #5770: Foreign key violation after insert

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Martin Edlman" <edlman(at)fortech(dot)cz>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5770: Foreign key violation after insert
Date: 2010-11-25 16:52:49
Message-ID: 14218.1290703969@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"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?

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2010-11-25 18:11:44 Re: Re: [BUGS] BUG #5650: Postgres service showing as stopped when in fact it is running
Previous Message Tom Lane 2010-11-25 16:20:38 Re: BUG #5769: Problem with SPI_getvalue