Fix caching of foreign-key-checking queries so that when a replan is needed,
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 15 Sep 2008 23:37:49 +0000 (23:37 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 15 Sep 2008 23:37:49 +0000 (23:37 +0000)
commit9490f01c4f3863371c100a453f84ddb85d51a0b3
tree9eb040265fe08972b45fa885965d918e658ad673
parent63f40d0af7ecd3608435bdc733434368a1652bb0
Fix caching of foreign-key-checking queries so that when a replan is needed,
we regenerate the SQL query text not merely the plan derived from it.  This
is needed to handle contingencies such as renaming of a table or column
used in an FK.  Pre-8.3, such cases worked despite the lack of replanning
(because the cached plan needn't actually change), so this is a regression.
Per bug #4417 from Benjamin Bihler.
src/backend/executor/spi.c
src/backend/utils/adt/ri_triggers.c
src/backend/utils/cache/plancache.c
src/include/executor/spi.h
src/include/utils/plancache.h