diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2008-09-15 23:37:49 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2008-09-15 23:37:49 +0000 |
commit | e4aea74e1924195d73c79dd68fb88eb7914dbd77 (patch) | |
tree | 5e219ab0efdce0b7298d1670d0d92318a69b7c35 /src/include/executor/spi.h | |
parent | e5b1eed7c916bbe747ee86da815ebe4ea8bdd643 (diff) | |
download | postgresql-e4aea74e1924195d73c79dd68fb88eb7914dbd77.tar.gz postgresql-e4aea74e1924195d73c79dd68fb88eb7914dbd77.zip |
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.
Diffstat (limited to 'src/include/executor/spi.h')
-rw-r--r-- | src/include/executor/spi.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/executor/spi.h b/src/include/executor/spi.h index e64fc39cba5..32d9488a667 100644 --- a/src/include/executor/spi.h +++ b/src/include/executor/spi.h @@ -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.65 2008/01/01 19:45:57 momjian Exp $ + * $PostgreSQL: pgsql/src/include/executor/spi.h,v 1.65.2.1 2008/09/15 23:37:49 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -114,6 +114,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); |