Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group