diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/access/printtup.h | 8 | ||||
-rw-r--r-- | src/include/executor/tstoreReceiver.h | 9 | ||||
-rw-r--r-- | src/include/tcop/dest.h | 14 | ||||
-rw-r--r-- | src/include/utils/portal.h | 7 |
4 files changed, 21 insertions, 17 deletions
diff --git a/src/include/access/printtup.h b/src/include/access/printtup.h index 4f2fcbf41d3..3249162ba8e 100644 --- a/src/include/access/printtup.h +++ b/src/include/access/printtup.h @@ -7,16 +7,18 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/printtup.h,v 1.36 2008/01/01 19:45:56 momjian Exp $ + * $PostgreSQL: pgsql/src/include/access/printtup.h,v 1.37 2008/11/30 20:51:25 tgl Exp $ * *------------------------------------------------------------------------- */ #ifndef PRINTTUP_H #define PRINTTUP_H -#include "tcop/dest.h" +#include "utils/portal.h" -extern DestReceiver *printtup_create_DR(CommandDest dest, Portal portal); +extern DestReceiver *printtup_create_DR(CommandDest dest); + +extern void SetRemoteDestReceiverParams(DestReceiver *self, Portal portal); extern void SendRowDescriptionMessage(TupleDesc typeinfo, List *targetlist, int16 *formats); diff --git a/src/include/executor/tstoreReceiver.h b/src/include/executor/tstoreReceiver.h index d4ea0b2b1dd..c304c1fce90 100644 --- a/src/include/executor/tstoreReceiver.h +++ b/src/include/executor/tstoreReceiver.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/executor/tstoreReceiver.h,v 1.10 2008/01/01 19:45:57 momjian Exp $ + * $PostgreSQL: pgsql/src/include/executor/tstoreReceiver.h,v 1.11 2008/11/30 20:51:25 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -19,7 +19,10 @@ #include "utils/tuplestore.h" -extern DestReceiver *CreateTuplestoreDestReceiver(Tuplestorestate *tStore, - MemoryContext tContext); +extern DestReceiver *CreateTuplestoreDestReceiver(void); + +extern void SetTuplestoreDestReceiverParams(DestReceiver *self, + Tuplestorestate *tStore, + MemoryContext tContext); #endif /* TSTORE_RECEIVER_H */ diff --git a/src/include/tcop/dest.h b/src/include/tcop/dest.h index 5522f78c68b..508b7ab3786 100644 --- a/src/include/tcop/dest.h +++ b/src/include/tcop/dest.h @@ -35,6 +35,12 @@ * The same receiver object may be re-used multiple times; eventually it is * destroyed by calling its rDestroy method. * + * In some cases, receiver objects require additional parameters that must + * be passed to them after calling CreateDestReceiver. Since the set of + * parameters varies for different receiver types, this is not handled by + * this module, but by direct calls from the calling code to receiver type + * specific functions. + * * The DestReceiver object returned by CreateDestReceiver may be a statically * allocated object (for destination types that require no local state), * in which case rDestroy is a no-op. Alternatively it can be a palloc'd @@ -54,7 +60,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/tcop/dest.h,v 1.55 2008/10/31 19:37:56 tgl Exp $ + * $PostgreSQL: pgsql/src/include/tcop/dest.h,v 1.56 2008/11/30 20:51:25 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -120,14 +126,10 @@ struct _DestReceiver extern DestReceiver *None_Receiver; /* permanent receiver for DestNone */ -/* This is a forward reference to utils/portal.h */ - -typedef struct PortalData *Portal; - /* The primary destination management functions */ extern void BeginCommand(const char *commandTag, CommandDest dest); -extern DestReceiver *CreateDestReceiver(CommandDest dest, Portal portal); +extern DestReceiver *CreateDestReceiver(CommandDest dest); extern void EndCommand(const char *commandTag, CommandDest dest); /* Additional functions that go with destination management, more or less. */ diff --git a/src/include/utils/portal.h b/src/include/utils/portal.h index c420d4d71ed..c6ccbf493ea 100644 --- a/src/include/utils/portal.h +++ b/src/include/utils/portal.h @@ -39,7 +39,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/portal.h,v 1.79 2008/07/18 20:26:06 tgl Exp $ + * $PostgreSQL: pgsql/src/include/utils/portal.h,v 1.80 2008/11/30 20:51:25 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -102,10 +102,7 @@ typedef enum PortalStatus PORTAL_FAILED /* portal got error (can't re-run it) */ } PortalStatus; -/* - * Note: typedef Portal is declared in tcop/dest.h as - * typedef struct PortalData *Portal; - */ +typedef struct PortalData *Portal; typedef struct PortalData { |