postgresql/src/backend
Tom Lane deac9488d3 Insert conditional SPI_push/SPI_pop calls into InputFunctionCall,
OutputFunctionCall, and friends.  This allows SPI-using functions to invoke
datatype I/O without concern for the possibility that a SPI-using function
will be called (which could be either the I/O function itself, or a function
used in a domain check constraint).  It's a tad ugly, but not nearly as ugly
as what'd be needed to make this work via retail insertion of push/pop
operations in all the PLs.

This reverts my patch of 2007-01-30 that inserted some retail SPI_push/pop
calls into plpgsql; that approach only fixed plpgsql, and not any other PLs.
But the other PLs have the issue too, as illustrated by a recent gripe from
Christian Schröder.

Back-patch to 8.2, which is as far back as this solution will work.  It's
also as far back as we need to worry about the domain-constraint case, since
earlier versions did not attempt to check domain constraints within datatype
input.  I'm not aware of any old I/O functions that use SPI themselves, so
this should be sufficient for a back-patch.
2009-01-07 20:38:56 +00:00
..
access Fix string reloption handling, per KaiGai Kohei. 2009-01-06 14:47:37 +00:00
bootstrap Update copyright for 2009. 2009-01-01 17:24:05 +00:00
catalog Fix embarrassing bug in recent smgr refactoring patch: WAL records should 2009-01-04 14:59:22 +00:00
commands Clarify a confusing comment about MCVs vs histogram entries. 2009-01-06 23:46:06 +00:00
executor Insert conditional SPI_push/SPI_pop calls into InputFunctionCall, 2009-01-07 20:38:56 +00:00
foreign Update copyright for 2009. 2009-01-01 17:24:05 +00:00
lib Update copyright for 2009. 2009-01-01 17:24:05 +00:00
libpq Add hba parameter include_realm to krb5, gss and sspi authentication, used 2009-01-07 13:09:21 +00:00
main Update copyright for 2009. 2009-01-01 17:24:05 +00:00
nodes Update copyright for 2009. 2009-01-01 17:24:05 +00:00
optimizer Fix an oversight in the function-default-arguments patch: after adding some 2009-01-06 01:23:21 +00:00
parser Update copyright for 2009. 2009-01-01 17:24:05 +00:00
po Translation updates 2008-01-31 18:04:52 +00:00
port Update copyright for 2009. 2009-01-01 17:24:05 +00:00
postmaster Add contrib/pg_stat_statements for server-wide tracking of statement execution 2009-01-04 22:19:59 +00:00
regex Refactor backend makefiles to remove lots of duplicate code 2008-02-19 10:30:09 +00:00
rewrite Update copyright for 2009. 2009-01-01 17:24:05 +00:00
snowball Update copyright for 2009. 2009-01-01 17:24:05 +00:00
storage Create a "shmem_startup_hook" to be called at the end of shared memory 2009-01-03 17:08:39 +00:00
tcop Update comment associated with 'debug_query_string'. 2009-01-07 19:35:43 +00:00
tsearch Update copyright for 2009. 2009-01-01 17:24:05 +00:00
utils Insert conditional SPI_push/SPI_pop calls into InputFunctionCall, 2009-01-07 20:38:56 +00:00
common.mk Code coverage testing with gcov. Documentation is in the regression test 2008-09-05 12:11:18 +00:00
Makefile Update copyright for 2009. 2009-01-01 17:24:05 +00:00
nls.mk Install a more robust solution for the problem of infinite error-processing 2008-10-27 19:37:22 +00:00