Skip site navigation (1) Skip section navigation (2)

pgsql-server/src/pl/plpgsql/src pl_exec.c pl_h ...

From: tgl(at)svr1(dot)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql-server/src/pl/plpgsql/src pl_exec.c pl_h ...
Date: 2003-09-28 23:37:45
Message-ID: 20030928233745.DCDD2D1B522@svr1.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
CVSROOT:	/cvsroot
Module name:	pgsql-server
Changes by:	tgl(at)svr1(dot)postgresql(dot)org	03/09/28 20:37:45

Modified files:
	src/pl/plpgsql/src: pl_exec.c pl_handler.c plpgsql.h 

Log message:
	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.


pgsql-committers by date

Next:From: Hiroshi InoueDate: 2003-09-28 23:50:09
Subject: Re: pgsql-server/src/backend catalog/index.c comma ...
Previous:From: Tom LaneDate: 2003-09-28 23:26:20
Subject: pgsql-server/src include/access/xact.h backend ...

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group