On Thu, 2005-04-21 at 23:52 -0400, Alvaro Herrera wrote:
> On Thu, Apr 21, 2005 at 11:15:48PM +0100, Simon Riggs wrote:

> This one is wrong ... it really means EXPLAIN EXECUTE.
> 

An updated patch, with changes to nodeAppend.c and nodeResult.c (only)

These are the only two files in /executor that have old QUEL comments in
to describe their behaviour, AFAICS.

Best Regards, Simon Riggs
Index: nodeAppend.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/backend/executor/nodeAppend.c,v
retrieving revision 1.62
diff -d -c -r1.62 nodeAppend.c
*** nodeAppend.c	31 Dec 2004 21:59:45 -0000	1.62
--- nodeAppend.c	22 Apr 2005 08:08:06 -0000
***************
*** 43,49 ****
   *		and student-emp inherits from student and employee, the
   *		query:
   *
!  *				retrieve (e.name) from e in person*
   *
   *		generates the plan:
   *
--- 43,49 ----
   *		and student-emp inherits from student and employee, the
   *		query:
   *
!  *				select name from person
   *
   *		generates the plan:
   *
Index: nodeResult.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/backend/executor/nodeResult.c,v
retrieving revision 1.29
diff -d -c -r1.29 nodeResult.c
*** nodeResult.c	31 Dec 2004 21:59:45 -0000	1.29
--- nodeResult.c	22 Apr 2005 08:08:06 -0000
***************
*** 8,22 ****
   *		Result nodes are used in queries where no relations are scanned.
   *		Examples of such queries are:
   *
!  *				retrieve (x = 1)
!  *		and
!  *				append emp (name = "mike", salary = 15000)
   *
   *		Result nodes are also used to optimise queries with constant
   *		qualifications (ie, quals that do not depend on the scanned data),
   *		such as:
   *
!  *				retrieve (emp.all) where 2 > 1
   *
   *		In this case, the plan generated is
   *
--- 8,20 ----
   *		Result nodes are used in queries where no relations are scanned.
   *		Examples of such queries are:
   *
!  *				select 1 * 2
   *
   *		Result nodes are also used to optimise queries with constant
   *		qualifications (ie, quals that do not depend on the scanned data),
   *		such as:
   *
!  *				select * from emp where 2 > 1
   *
   *		In this case, the plan generated is
   *
***************
*** 24,30 ****
   *						/
   *				   SeqScan (emp.all)
   *
!  *		At runtime, the Result node evaluates the constant qual once.
   *		If it's false, we can return an empty result set without running
   *		the controlled plan at all.  If it's true, we run the controlled
   *		plan normally and pass back the results.
--- 22,29 ----
   *						/
   *				   SeqScan (emp.all)
   *
!  *		At runtime, the Result node evaluates the constant qual once,
!  *      which is shown on an EXPLAIN as a One-Time Filter.
   *		If it's false, we can return an empty result set without running
   *		the controlled plan at all.  If it's true, we run the controlled
   *		plan normally and pass back the results.
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to