OSDN Git Service

Restructure command destination handling so that we pass around
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 6 May 2003 20:26:28 +0000 (20:26 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 6 May 2003 20:26:28 +0000 (20:26 +0000)
commit79913910d4b518a42c893b6dd459656798ffa591
treef0cd5c25dff8d026b9d8d4736717a4d38c278134
parent299fbb4b379003557f79d2732a85ece168d04ec4
Restructure command destination handling so that we pass around
DestReceiver pointers instead of just CommandDest values.  The DestReceiver
is made at the point where the destination is selected, rather than
deep inside the executor.  This cleans up the original kluge implementation
of tstoreReceiver.c, and makes it easy to support retrieving results
from utility statements inside portals.  Thus, you can now do fun things
like Bind and Execute a FETCH or EXPLAIN command, and it'll all work
as expected (e.g., you can Describe the portal, or use Execute's count
parameter to suspend the output partway through).  Implementation involves
stuffing the utility command's output into a Tuplestore, which would be
kind of annoying for huge output sets, but should be quite acceptable
for typical uses of utility commands.
28 files changed:
src/backend/access/common/printtup.c
src/backend/commands/explain.c
src/backend/commands/portalcmds.c
src/backend/commands/prepare.c
src/backend/commands/schemacmds.c
src/backend/executor/execMain.c
src/backend/executor/execTuples.c
src/backend/executor/functions.c
src/backend/executor/spi.c
src/backend/executor/tstoreReceiver.c
src/backend/tcop/dest.c
src/backend/tcop/postgres.c
src/backend/tcop/pquery.c
src/backend/tcop/utility.c
src/backend/utils/misc/guc.c
src/backend/utils/mmgr/portalmem.c
src/include/access/printtup.h
src/include/commands/explain.h
src/include/commands/portalcmds.h
src/include/commands/prepare.h
src/include/executor/execdesc.h
src/include/executor/executor.h
src/include/executor/tstoreReceiver.h
src/include/tcop/dest.h
src/include/tcop/pquery.h
src/include/tcop/utility.h
src/include/utils/guc.h
src/include/utils/portal.h