PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
tstoreReceiver.h File Reference
#include "tcop/dest.h"
#include "utils/tuplestore.h"
Include dependency graph for tstoreReceiver.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

DestReceiverCreateTuplestoreDestReceiver (void)
 
void SetTuplestoreDestReceiverParams (DestReceiver *self, Tuplestorestate *tStore, MemoryContext tContext, bool detoast)
 

Function Documentation

DestReceiver* CreateTuplestoreDestReceiver ( void  )

Definition at line 191 of file tstoreReceiver.c.

References DestTuplestore, palloc0(), tstoreDestroyReceiver(), tstoreReceiveSlot_notoast(), tstoreShutdownReceiver(), and tstoreStartupReceiver().

Referenced by CreateDestReceiver().

192 {
193  TStoreState *self = (TStoreState *) palloc0(sizeof(TStoreState));
194 
195  self->pub.receiveSlot = tstoreReceiveSlot_notoast; /* might change */
196  self->pub.rStartup = tstoreStartupReceiver;
197  self->pub.rShutdown = tstoreShutdownReceiver;
198  self->pub.rDestroy = tstoreDestroyReceiver;
199  self->pub.mydest = DestTuplestore;
200 
201  /* private fields will be set by SetTuplestoreDestReceiverParams */
202 
203  return (DestReceiver *) self;
204 }
static void tstoreShutdownReceiver(DestReceiver *self)
static bool tstoreReceiveSlot_notoast(TupleTableSlot *slot, DestReceiver *self)
static void tstoreStartupReceiver(DestReceiver *self, int operation, TupleDesc typeinfo)
void * palloc0(Size size)
Definition: mcxt.c:920
static void tstoreDestroyReceiver(DestReceiver *self)
void SetTuplestoreDestReceiverParams ( DestReceiver self,
Tuplestorestate tStore,
MemoryContext  tContext,
bool  detoast 
)

Definition at line 210 of file tstoreReceiver.c.

References Assert, TStoreState::cxt, DestTuplestore, TStoreState::detoast, _DestReceiver::mydest, TStoreState::pub, and TStoreState::tstore.

Referenced by FillPortalStore(), and PersistHoldablePortal().

214 {
215  TStoreState *myState = (TStoreState *) self;
216 
217  Assert(myState->pub.mydest == DestTuplestore);
218  myState->tstore = tStore;
219  myState->cxt = tContext;
220  myState->detoast = detoast;
221 }
MemoryContext cxt
CommandDest mydest
Definition: dest.h:128
DestReceiver pub
Tuplestorestate * tstore
#define Assert(condition)
Definition: c.h:671