diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-09-28 23:37:45 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-09-28 23:37:45 +0000 |
commit | 8b510838f6213f69aeca8f237f7718ea1b14a5d1 (patch) | |
tree | a201b27382b886d617406a01a3a2da4196ce1fd4 /src/backend/utils/adt/mac.c | |
parent | 89347900527af6881efbf681b4e330d8074d35dd (diff) | |
download | postgresql-8b510838f6213f69aeca8f237f7718ea1b14a5d1.tar.gz postgresql-8b510838f6213f69aeca8f237f7718ea1b14a5d1.zip |
Restructure plpgsql's caching of 'simple' expression evaluation trees
to be less dangerous, and often faster as well. ExprState trees are
not kept across transaction boundaries; this eliminates problems with
resource leakage in failed transactions. But by keeping them in a
per-transaction EState, we can safely arrange for a single ExprState
to be shared by all the expression evaluations done in a given plpgsql
function call. (Formerly it seemed necessary to create and destroy an
ExprState for each exec_eval_simple_expr() call.) This saves time in
any scenario where a plpgsql function executes more than one expression.
Seems to be about as fast as 7.3 for simple cases, and significantly
faster for functions that do a lot of calculations.
Diffstat (limited to 'src/backend/utils/adt/mac.c')
0 files changed, 0 insertions, 0 deletions