PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/printtup.h"
#include "libpq/libpq.h"
#include "libpq/pqformat.h"
#include "tcop/pquery.h"
#include "utils/lsyscache.h"
#include "utils/memdebug.h"
#include "utils/memutils.h"
Go to the source code of this file.
Data Structures | |
struct | PrinttupAttrInfo |
struct | DR_printtup |
void debugStartup | ( | DestReceiver * | self, |
int | operation, | ||
TupleDesc | typeinfo | ||
) |
Definition at line 596 of file printtup.c.
References i, TupleDescData::natts, printatt(), printf, and TupleDescAttr.
bool debugtup | ( | TupleTableSlot * | slot, |
DestReceiver * | self | ||
) |
Definition at line 614 of file printtup.c.
References atttypid, getTypeOutputInfo(), i, TupleDescData::natts, OidOutputFunctionCall(), printatt(), printf, slot_getattr(), TupleTableSlot::tts_tupleDescriptor, TupleDescAttr, and value.
Referenced by print_slot().
|
static |
Definition at line 575 of file printtup.c.
References NameStr, and printf.
Referenced by debugStartup(), and debugtup().
|
static |
Definition at line 378 of file printtup.c.
References DR_printtup::attrinfo, buf, DR_printtup::buf, DatumGetPointer, PrinttupAttrInfo::finfo, PrinttupAttrInfo::format, i, MemoryContextReset(), MemoryContextSwitchTo(), DR_printtup::myinfo, DR_printtup::nattrs, TupleDescData::natts, OutputFunctionCall(), pq_beginmessage_reuse(), pq_endmessage_reuse(), pq_sendbytes(), pq_sendcountedtext(), pq_sendint16(), pq_sendint32(), printtup_prepare_info(), SendFunctionCall(), slot_getallattrs(), DR_printtup::tmpcontext, TupleTableSlot::tts_isnull, TupleTableSlot::tts_tupleDescriptor, TupleTableSlot::tts_values, PrinttupAttrInfo::typisvarlena, VALGRIND_CHECK_MEM_IS_DEFINED, VARDATA, VARHDRSZ, VARSIZE, and VARSIZE_ANY.
Referenced by printtup_create_DR().
|
static |
Definition at line 463 of file printtup.c.
References Assert, DR_printtup::attrinfo, buf, DR_printtup::buf, PrinttupAttrInfo::finfo, PrinttupAttrInfo::format, i, MemoryContextReset(), MemoryContextSwitchTo(), DR_printtup::myinfo, DR_printtup::nattrs, TupleDescData::natts, OutputFunctionCall(), pq_beginmessage_reuse(), pq_endmessage_reuse(), pq_sendcountedtext(), pq_sendint8(), printtup_prepare_info(), slot_getallattrs(), DR_printtup::tmpcontext, TupleTableSlot::tts_isnull, TupleTableSlot::tts_tupleDescriptor, and TupleTableSlot::tts_values.
Referenced by SetRemoteDestReceiverParams().
DestReceiver* printtup_create_DR | ( | CommandDest | dest | ) |
Definition at line 78 of file printtup.c.
References generate_unaccent_rules::dest, DestRemote, palloc0(), printtup(), printtup_destroy(), printtup_shutdown(), and printtup_startup().
Referenced by CreateDestReceiver().
|
static |
|
static |
Definition at line 652 of file printtup.c.
References Assert, DR_printtup::attrinfo, buf, DR_printtup::buf, PrinttupAttrInfo::finfo, PrinttupAttrInfo::format, i, MemoryContextReset(), MemoryContextSwitchTo(), DR_printtup::myinfo, DR_printtup::nattrs, TupleDescData::natts, pq_beginmessage_reuse(), pq_endmessage_reuse(), pq_sendbytes(), pq_sendint32(), pq_sendint8(), printtup_prepare_info(), SendFunctionCall(), slot_getallattrs(), DR_printtup::tmpcontext, TupleTableSlot::tts_isnull, TupleTableSlot::tts_tupleDescriptor, TupleTableSlot::tts_values, VARDATA, VARHDRSZ, and VARSIZE.
Referenced by SetRemoteDestReceiverParams().
|
static |
Definition at line 327 of file printtup.c.
References DR_printtup::attrinfo, ereport, errcode(), errmsg(), ERROR, PrinttupAttrInfo::finfo, fmgr_info(), PrinttupAttrInfo::format, format, PortalData::formats, getTypeBinaryOutputInfo(), getTypeOutputInfo(), i, DR_printtup::myinfo, DR_printtup::nattrs, palloc0(), pfree(), DR_printtup::portal, TupleDescAttr, PrinttupAttrInfo::typisvarlena, PrinttupAttrInfo::typoutput, and PrinttupAttrInfo::typsend.
Referenced by printtup(), printtup_20(), and printtup_internal_20().
|
static |
Definition at line 541 of file printtup.c.
References DR_printtup::attrinfo, DR_printtup::buf, StringInfoData::data, MemoryContextDelete(), DR_printtup::myinfo, pfree(), and DR_printtup::tmpcontext.
Referenced by printtup_create_DR().
|
static |
Definition at line 131 of file printtup.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, DR_printtup::buf, CurrentMemoryContext, FetchPortalTargetList(), PortalData::formats, FrontendProtocol, initStringInfo(), PortalData::name, PG_PROTOCOL_MAJOR, DR_printtup::portal, pq_puttextmessage(), DR_printtup::sendDescrip, SendRowDescriptionMessage(), and DR_printtup::tmpcontext.
Referenced by printtup_create_DR().
|
static |
Definition at line 300 of file printtup.c.
References atttypid, getBaseTypeAndTypmod(), i, NameStr, TupleDescData::natts, pq_sendint16(), pq_sendint32(), pq_sendstring(), and TupleDescAttr.
Referenced by SendRowDescriptionMessage().
|
static |
Definition at line 224 of file printtup.c.
References atttypid, enlargeStringInfo(), format, getBaseTypeAndTypmod(), i, lfirst, list_head(), lnext(), MAX_CONVERSION_GROWTH, NAMEDATALEN, NameStr, TupleDescData::natts, pq_writeint16(), pq_writeint32(), pq_writestring(), TargetEntry::resorigcol, TargetEntry::resorigtbl, and TupleDescAttr.
Referenced by SendRowDescriptionMessage().
void SendRowDescriptionMessage | ( | StringInfo | buf, |
TupleDesc | typeinfo, | ||
List * | targetlist, | ||
int16 * | formats | ||
) |
Definition at line 201 of file printtup.c.
References FrontendProtocol, TupleDescData::natts, PG_PROTOCOL_MAJOR, pq_beginmessage_reuse(), pq_endmessage_reuse(), pq_sendint16(), SendRowDescriptionCols_2(), and SendRowDescriptionCols_3().
Referenced by exec_describe_portal_message(), exec_describe_statement_message(), and printtup_startup().
void SetRemoteDestReceiverParams | ( | DestReceiver * | self, |
Portal | portal | ||
) |
Definition at line 107 of file printtup.c.
References Assert, DestRemote, DestRemoteExecute, PortalData::formats, FrontendProtocol, _DestReceiver::mydest, PG_PROTOCOL_MAJOR, DR_printtup::portal, printtup_20(), printtup_internal_20(), DR_printtup::pub, and _DestReceiver::receiveSlot.
Referenced by exec_execute_message(), and exec_simple_query().