aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2010-10-28 13:00:54 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2010-10-28 13:02:12 -0400
commit8ce22dd4c51b6e8155889653c0116cad13877512 (patch)
tree7cccc7bc1c205514d95ce9f24a4bf7eef791b2bf /src/backend/access/gist
parente9eb4f401333209139af1acee2cd4251b05e0397 (diff)
downloadpostgresql-8ce22dd4c51b6e8155889653c0116cad13877512.tar.gz
postgresql-8ce22dd4c51b6e8155889653c0116cad13877512.zip
Fix plpgsql's handling of "simple" expression evaluation.
In general, expression execution state trees aren't re-entrantly usable, since functions can store private state information in them. For efficiency reasons, plpgsql tries to cache and reuse state trees for "simple" expressions. It can get away with that most of the time, but it can fail if the state tree is dirty from a previous failed execution (as in an example from Alvaro) or is being used recursively (as noted by me). Fix by tracking whether a state tree is in use, and falling back to the "non-simple" code path if so. This results in a pretty considerable speed hit when the non-simple path is taken, but the available alternatives seem even more unpleasant because they add overhead in the simple path. Per idea from Heikki. Back-patch to all supported branches.
Diffstat (limited to 'src/backend/access/gist')
0 files changed, 0 insertions, 0 deletions