FK plans cached? Known bug? - Mailing list pgsql-bugs

From Alvaro Herrera
Subject FK plans cached? Known bug?
Date
Msg-id 20070518172652.GJ6695@alvh.no-ip.org
Whole thread Raw
Responses Re: FK plans cached? Known bug?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
I know that in 8.3 we have the new plan caching mechanism which fixes
this, but I am wondering if this particular problem was known:

alvherre=# delete from a where a = 2;
ERROR:  update o delete en «a» viola la llave foránea «b_a_fkey» en «b»
DETAIL:  La llave (a)=(2) todavía es referida desde la tabla «b».

alvherre=# drop index b_a;
DROP INDEX
alvherre=# delete from a where a = 2;
ERROR:  could not open relation with OID 16433
CONTEXT:  sentencia SQL: «SELECT 1 FROM ONLY "public"."b" x WHERE "a" = $1 FOR SHARE OF x»

(This is on 8.2)  What is happening here -- are we caching the plan for
the FK check query?

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-bugs by date:

Previous
From: Peter Koczan
Date:
Subject: Re: BUG #3266: SSL broken pipes kill the machine and fill the disk
Next
From: Tom Lane
Date:
Subject: Re: FK plans cached? Known bug?