_getPlan missing support for some Plan node elements
_getPlan missing support for some Plan node elements
От:
Joe Conway <mail@joeconway.com>
Дата:
I was poking around the PREPARE/EXECUTE code, and I noticed _getPlan(Plan *node) in readfuncs.c is missing support for 4 elements of the Plan struct. Attached patch adds it. If there are no objections, please apply. Thanks, Joe Index: src/backend/nodes/readfuncs.c =================================================================== RCS file: /opt/src/cvs/pgsql-server/src/backend/nodes/readfuncs.c,v retrieving revision 1.136 diff -c -r1.136 readfuncs.c *** src/backend/nodes/readfuncs.c 6 Nov 2002 00:00:44 -0000 1.136 --- src/backend/nodes/readfuncs.c 6 Nov 2002 17:20:33 -0000 *************** *** 332,337 **** --- 332,350 ---- token = pg_strtok(&length); /* eat :righttree */ node->righttree = (Plan *) nodeRead(true); + token = pg_strtok(&length); /* eat :extprm */ + node->extParam = toIntList(nodeRead(true)); + + token = pg_strtok(&length); /* eat :locprm */ + node->locParam = toIntList(nodeRead(true)); + + token = pg_strtok(&length); /* eat :initplan */ + node->initPlan = (List *) nodeRead(true); + + token = pg_strtok(&length); /* eat :nprm */ + token = pg_strtok(&length); /* get :nprm */ + node->nParamExec = atoi(token); + node->state = (EState *) NULL; /* never read in */ return;
Re: _getPlan missing support for some Plan node elements
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Joe Conway writes: > I was poking around the PREPARE/EXECUTE code, and I noticed _getPlan(Plan > *node) in readfuncs.c is missing support for 4 elements of the Plan struct. > Attached patch adds it. Actually, there is no reason for readfuncs.c to support Plan node types at all; I've been thinking of ripping out all that code since it's (a) useless and (b) tedious to maintain. regards, tom lane