59 bool needtoast =
false;
60 int natts = typeinfo->
natts;
66 for (
i = 0;
i < natts;
i++)
70 if (attr->attisdropped)
72 if (attr->attlen == -1)
140 int natts = typeinfo->
natts;
154 for (
i = 0;
i < natts;
i++)
159 if (!attr->attisdropped && attr->attlen == -1 && !slot->
tts_isnull[
i])
181 for (
i = 0;
i < nfree;
i++)
271 const char *map_failure_msg)
275 Assert(!(detoast && target_tupdesc));
279 myState->
cxt = tContext;
#define Assert(condition)
struct varlena * detoast_external_attr(struct varlena *attr)
const TupleTableSlotOps TTSOpsVirtual
void ExecDropSingleTupleTableSlot(TupleTableSlot *slot)
TupleTableSlot * MakeSingleTupleTableSlot(TupleDesc tupdesc, const TupleTableSlotOps *tts_ops)
void pfree(void *pointer)
void * palloc0(Size size)
void * MemoryContextAlloc(MemoryContext context, Size size)
FormData_pg_attribute * Form_pg_attribute
static Datum PointerGetDatum(const void *X)
static Pointer DatumGetPointer(Datum X)
MemoryContextSwitchTo(old_ctx)
const char * map_failure_msg
TupleConversionMap * tupmap
TupleDesc tts_tupleDescriptor
bool(* receiveSlot)(TupleTableSlot *slot, DestReceiver *self)
static bool tstoreReceiveSlot_detoast(TupleTableSlot *slot, DestReceiver *self)
static bool tstoreReceiveSlot_tupmap(TupleTableSlot *slot, DestReceiver *self)
DestReceiver * CreateTuplestoreDestReceiver(void)
static void tstoreStartupReceiver(DestReceiver *self, int operation, TupleDesc typeinfo)
static void tstoreShutdownReceiver(DestReceiver *self)
void SetTuplestoreDestReceiverParams(DestReceiver *self, Tuplestorestate *tStore, MemoryContext tContext, bool detoast, TupleDesc target_tupdesc, const char *map_failure_msg)
static void tstoreDestroyReceiver(DestReceiver *self)
static bool tstoreReceiveSlot_notoast(TupleTableSlot *slot, DestReceiver *self)
TupleConversionMap * convert_tuples_by_position(TupleDesc indesc, TupleDesc outdesc, const char *msg)
TupleTableSlot * execute_attr_map_slot(AttrMap *attrMap, TupleTableSlot *in_slot, TupleTableSlot *out_slot)
void free_conversion_map(TupleConversionMap *map)
#define TupleDescAttr(tupdesc, i)
void tuplestore_puttupleslot(Tuplestorestate *state, TupleTableSlot *slot)
void tuplestore_putvalues(Tuplestorestate *state, TupleDesc tdesc, const Datum *values, const bool *isnull)
static void slot_getallattrs(TupleTableSlot *slot)
#define VARATT_IS_EXTERNAL(PTR)