mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-20 21:37:11 +08:00
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.
26 lines
689 B
C
26 lines
689 B
C
/*-------------------------------------------------------------------------
|
|
*
|
|
* tstoreReceiver.h
|
|
* prototypes for tstoreReceiver.c
|
|
*
|
|
*
|
|
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
*
|
|
* $Id: tstoreReceiver.h,v 1.2 2003/05/06 20:26:28 tgl Exp $
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
|
|
#ifndef TSTORE_RECEIVER_H
|
|
#define TSTORE_RECEIVER_H
|
|
|
|
#include "tcop/dest.h"
|
|
#include "utils/tuplestore.h"
|
|
|
|
|
|
extern DestReceiver *CreateTuplestoreDestReceiver(Tuplestorestate *tStore,
|
|
MemoryContext tContext);
|
|
|
|
#endif /* TSTORE_RECEIVER_H */
|