postgresql/src/backend
Tom Lane 745e6edaae Fix SPI_cursor_open() and SPI_is_cursor_plan() to push the SPI stack before
doing anything interesting, such as calling RevalidateCachedPlan().  The
necessity of this is demonstrated by an example from Willem Buitendyk:
during a replan, the planner might try to evaluate SPI-using functions,
and so we'd better be in a clean SPI context.

A small downside of this fix is that these two functions will now fail
outright if called when not inside a SPI-using procedure (ie, a
SPI_connect/SPI_finish pair).  The documentation never promised or suggested
that that would work, though; and they are normally used in concert with
other functions, mainly SPI_prepare, that always have failed in such a case.
So the odds of breaking something seem pretty low.

In passing, make SPI_is_cursor_plan's error handling convention clearer,
and fix documentation's erroneous claim that SPI_cursor_open would
return NULL on error.

Before 8.3 these functions could not invoke replanning, so there is probably
no need for back-patching.
2008-02-12 04:09:44 +00:00
..
access Add a GUC variable "synchronize_seqscans" to allow clients to disable the new 2008-01-30 18:35:55 +00:00
bootstrap Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
catalog Add checks to TRUNCATE, CLUSTER, and REINDEX to prevent performing these 2008-01-30 19:46:48 +00:00
commands Repair VACUUM FULL bug introduced by HOT patch: the original way of 2008-02-11 19:14:30 +00:00
executor Fix SPI_cursor_open() and SPI_is_cursor_plan() to push the SPI stack before 2008-02-12 04:09:44 +00:00
lib Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
libpq Since GSSAPI and SSPI authentication don't work in protocol version 2, 2008-02-08 17:58:46 +00:00
main Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
nodes Add missing copyfuncs/equalfuncs support for AlterTSDictionaryStmt and 2008-02-07 20:19:47 +00:00
optimizer Fix silly mistake in expand_indexqual_rowcompare --- in converting a forboth() 2008-02-07 17:53:53 +00:00
parser Some variants of ALTER OWNER tried to make the "object" field of the 2008-02-07 21:07:55 +00:00
po Translation updates 2008-01-31 18:04:52 +00:00
port Change StatementCancelHandler() to check the DoingCommandRead flag to decide 2008-01-26 19:55:08 +00:00
postmaster Fix two different copy-and-paste-os in CSV log rotation logic; one that led to 2008-01-25 20:42:10 +00:00
regex Fix assorted security-grade bugs in the regex engine. All of these problems 2008-01-03 20:47:55 +00:00
rewrite Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
snowball Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
storage Fix PageGetExactFreeSpace() so that it actually behaves sensibly 2008-02-10 20:39:08 +00:00
tcop Change StatementCancelHandler() to check the DoingCommandRead flag to decide 2008-01-26 19:55:08 +00:00
tsearch Fix RS_isRegis() to agree exactly with RS_compile()'s idea of what's a valid 2008-01-21 02:46:11 +00:00
utils Avoid misbehavior in foreign key checks when casting to a datatype for which 2008-02-07 22:58:35 +00:00
Makefile Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
nls.mk Translation updates 2008-01-30 11:05:41 +00:00