From cf88f005f2662fd1dec2206d0ce1f3ab316c54e0 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 18 Dec 2003 22:23:55 +0000 Subject: Use a shutdown callback to clear setArgsValid in a FuncExprState that is evaluating a set-valued function. This fixes some additional problems with rescanning partially-evaluated SRFs. --- src/include/nodes/execnodes.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/include/nodes/execnodes.h') diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index 4112cd49de6..fea27f9df20 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: execnodes.h,v 1.107 2003/10/01 21:30:52 tgl Exp $ + * $Id: execnodes.h,v 1.107.2.1 2003/12/18 22:23:55 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -481,6 +481,13 @@ typedef struct FuncExprState */ bool setHasSetArg; /* some argument returns a set */ + /* + * Flag to remember whether we have registered a shutdown callback for + * this FuncExprState. We do so only if setArgsValid has been true at + * least once (since all the callback is for is to clear setArgsValid). + */ + bool shutdown_reg; /* a shutdown callback is registered */ + /* * Current argument data for a set-valued function; contains valid * data only if setArgsValid is true. -- cgit v1.2.3