mirror of
https://github.com/postgres/postgres.git
synced 2025-07-17 06:41:09 +03:00
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.
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/executor/spi.h,v 1.66 2008/04/01 03:09:30 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/executor/spi.h,v 1.67 2008/09/15 23:37:40 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -118,6 +118,7 @@ extern int SPI_freeplan(SPIPlanPtr plan);
|
||||
extern Oid SPI_getargtypeid(SPIPlanPtr plan, int argIndex);
|
||||
extern int SPI_getargcount(SPIPlanPtr plan);
|
||||
extern bool SPI_is_cursor_plan(SPIPlanPtr plan);
|
||||
extern bool SPI_plan_is_valid(SPIPlanPtr plan);
|
||||
extern const char *SPI_result_code_string(int code);
|
||||
|
||||
extern HeapTuple SPI_copytuple(HeapTuple tuple);
|
||||
|
Reference in New Issue
Block a user