Thread: pgsql: Fix caching of foreign-key-checking queries so that when a replan
pgsql: Fix caching of foreign-key-checking queries so that when a replan
From
tgl@postgresql.org (Tom Lane)
Date:
Log Message: ----------- 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. Tags: ---- REL8_3_STABLE Modified Files: -------------- pgsql/src/backend/executor: spi.c (r1.188.2.1 -> r1.188.2.2) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/spi.c?r1=1.188.2.1&r2=1.188.2.2) pgsql/src/backend/utils/adt: ri_triggers.c (r1.103.2.2 -> r1.103.2.3) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/ri_triggers.c?r1=1.103.2.2&r2=1.103.2.3) pgsql/src/backend/utils/cache: plancache.c (r1.15 -> r1.15.2.1) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/cache/plancache.c?r1=1.15&r2=1.15.2.1) pgsql/src/include/executor: spi.h (r1.65 -> r1.65.2.1) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/executor/spi.h?r1=1.65&r2=1.65.2.1) pgsql/src/include/utils: plancache.h (r1.11 -> r1.11.2.1) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/plancache.h?r1=1.11&r2=1.11.2.1)