79 self->pub.mydest =
dest;
87 self->attrinfo = NULL;
90 self->buf.data = NULL;
91 self->tmpcontext = NULL;
169 int natts = typeinfo->
natts;
195 for (
i = 0;
i < natts; ++
i)
198 Oid atttypid = att->atttypid;
199 int32 atttypmod = att->atttypmod;
213 tlist_item =
lnext(targetlist, tlist_item);
218 resorigtbl = tle->resorigtbl;
219 resorigcol = tle->resorigcol;
220 tlist_item =
lnext(targetlist, tlist_item);
261 myState->
nattrs = numAttrs;
268 for (
i = 0;
i < numAttrs;
i++)
291 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
310 int natts = typeinfo->
natts;
333 for (
i = 0;
i < natts; ++
i)
355 if (thisState->
format == 0)
427 printf(
"\t%2d: %s%s%s%s\t(typeid = %u, len = %d, typmod = %d, byval = %c)\n",
430 value != NULL ?
" = \"" :
"",
432 value != NULL ?
"\"" :
"",
433 (
unsigned int) (attributeP->atttypid),
435 attributeP->atttypmod,
436 attributeP->attbyval ?
't' :
'f');
446 int natts = typeinfo->
natts;
452 for (
i = 0;
i < natts; ++
i)
465 int natts = typeinfo->
natts;
473 for (
i = 0;
i < natts; ++
i)
479 &typoutput, &typisvarlena);
#define Assert(condition)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
void fmgr_info(Oid functionId, FmgrInfo *finfo)
char * OidOutputFunctionCall(Oid functionId, Datum val)
bytea * SendFunctionCall(FmgrInfo *flinfo, Datum val)
char * OutputFunctionCall(FmgrInfo *flinfo, Datum val)
void getTypeBinaryOutputInfo(Oid type, Oid *typSend, bool *typIsVarlena)
void getTypeOutputInfo(Oid type, Oid *typOutput, bool *typIsVarlena)
Oid getBaseTypeAndTypmod(Oid typid, int32 *typmod)
void MemoryContextReset(MemoryContext context)
void pfree(void *pointer)
void * palloc0(Size size)
MemoryContext CurrentMemoryContext
void MemoryContextDelete(MemoryContext context)
#define VALGRIND_CHECK_MEM_IS_DEFINED(addr, size)
#define AllocSetContextCreate
#define ALLOCSET_DEFAULT_SIZES
FormData_pg_attribute * Form_pg_attribute
static ListCell * list_head(const List *l)
static ListCell * lnext(const List *l, const ListCell *c)
#define MAX_CONVERSION_GROWTH
static Pointer DatumGetPointer(Datum X)
List * FetchPortalTargetList(Portal portal)
bool debugtup(TupleTableSlot *slot, DestReceiver *self)
static void printatt(unsigned attributeId, Form_pg_attribute attributeP, char *value)
void debugStartup(DestReceiver *self, int operation, TupleDesc typeinfo)
static void printtup_prepare_info(DR_printtup *myState, TupleDesc typeinfo, int numAttrs)
static bool printtup(TupleTableSlot *slot, DestReceiver *self)
static void printtup_startup(DestReceiver *self, int operation, TupleDesc typeinfo)
void SetRemoteDestReceiverParams(DestReceiver *self, Portal portal)
void SendRowDescriptionMessage(StringInfo buf, TupleDesc typeinfo, List *targetlist, int16 *formats)
static void printtup_destroy(DestReceiver *self)
DestReceiver * printtup_create_DR(CommandDest dest)
static void printtup_shutdown(DestReceiver *self)
#define PqMsg_RowDescription
MemoryContextSwitchTo(old_ctx)
void enlargeStringInfo(StringInfo str, int needed)
void initStringInfo(StringInfo str)
PrinttupAttrInfo * myinfo
TupleDesc tts_tupleDescriptor
#define TupleDescAttr(tupdesc, i)
static Datum slot_getattr(TupleTableSlot *slot, int attnum, bool *isnull)
static void slot_getallattrs(TupleTableSlot *slot)