1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-27 07:42:10 +03:00

Clean up BeginCommand and related routines. BeginCommand and EndCommand

are now both invoked once per received SQL command (raw parsetree) from
pg_exec_query_string.  BeginCommand is actually just an empty routine
at the moment --- all its former operations have been pushed into tuple
receiver setup routines in printtup.c.  This makes for a clean distinction
between BeginCommand/EndCommand (once per command) and the tuple receiver
setup/teardown routines (once per ExecutorRun call), whereas the old code
was quite ad hoc.  Along the way, clean up the calling conventions for
ExecutorRun a little bit.
This commit is contained in:
Tom Lane
2002-02-27 19:36:13 +00:00
parent e22c9c4475
commit 6779c55c22
15 changed files with 266 additions and 361 deletions

View File

@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: execdesc.h,v 1.17 2001/11/05 17:46:33 momjian Exp $
* $Id: execdesc.h,v 1.18 2002/02/27 19:35:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -19,6 +19,7 @@
#include "nodes/plannodes.h"
#include "tcop/dest.h"
/* ----------------
* query descriptor:
* a QueryDesc encapsulates everything that the executor
@@ -31,10 +32,14 @@ typedef struct QueryDesc
Query *parsetree;
Plan *plantree;
CommandDest dest; /* the destination output of the execution */
const char *portalName; /* name of portal, or NULL */
TupleDesc tupDesc; /* set by ExecutorStart */
} QueryDesc;
/* in pquery.c */
extern QueryDesc *CreateQueryDesc(Query *parsetree, Plan *plantree,
CommandDest dest);
CommandDest dest, const char *portalName);
#endif /* EXECDESC_H */