PostgreSQL Source Code git master
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, TupleDesc target_tupdesc, const char *map_failure_msg)
 

Function Documentation

◆ CreateTuplestoreDestReceiver()

DestReceiver * CreateTuplestoreDestReceiver ( void  )

Definition at line 238 of file tstoreReceiver.c.

239{
240 TStoreState *self = (TStoreState *) palloc0(sizeof(TStoreState));
241
242 self->pub.receiveSlot = tstoreReceiveSlot_notoast; /* might change */
246 self->pub.mydest = DestTuplestore;
247
248 /* private fields will be set by SetTuplestoreDestReceiverParams */
249
250 return (DestReceiver *) self;
251}
@ DestTuplestore
Definition: dest.h:93
void * palloc0(Size size)
Definition: mcxt.c:1347
DestReceiver pub
void(* rStartup)(DestReceiver *self, int operation, TupleDesc typeinfo)
Definition: dest.h:121
void(* rShutdown)(DestReceiver *self)
Definition: dest.h:124
bool(* receiveSlot)(TupleTableSlot *slot, DestReceiver *self)
Definition: dest.h:118
void(* rDestroy)(DestReceiver *self)
Definition: dest.h:126
CommandDest mydest
Definition: dest.h:128
static void tstoreStartupReceiver(DestReceiver *self, int operation, TupleDesc typeinfo)
static void tstoreShutdownReceiver(DestReceiver *self)
static void tstoreDestroyReceiver(DestReceiver *self)
static bool tstoreReceiveSlot_notoast(TupleTableSlot *slot, DestReceiver *self)

References DestTuplestore, _DestReceiver::mydest, palloc0(), TStoreState::pub, _DestReceiver::rDestroy, _DestReceiver::receiveSlot, _DestReceiver::rShutdown, _DestReceiver::rStartup, tstoreDestroyReceiver(), tstoreReceiveSlot_notoast(), tstoreShutdownReceiver(), and tstoreStartupReceiver().

Referenced by CreateDestReceiver().

◆ SetTuplestoreDestReceiverParams()

void SetTuplestoreDestReceiverParams ( DestReceiver self,
Tuplestorestate tStore,
MemoryContext  tContext,
bool  detoast,
TupleDesc  target_tupdesc,
const char *  map_failure_msg 
)

Definition at line 266 of file tstoreReceiver.c.

272{
273 TStoreState *myState = (TStoreState *) self;
274
275 Assert(!(detoast && target_tupdesc));
276
277 Assert(myState->pub.mydest == DestTuplestore);
278 myState->tstore = tStore;
279 myState->cxt = tContext;
280 myState->detoast = detoast;
281 myState->target_tupdesc = target_tupdesc;
282 myState->map_failure_msg = map_failure_msg;
283}
#define Assert(condition)
Definition: c.h:815
Tuplestorestate * tstore
MemoryContext cxt
const char * map_failure_msg
TupleDesc target_tupdesc

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

Referenced by exec_stmt_return_query(), FillPortalStore(), and PersistHoldablePortal().