PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/printtup.h"
#include "libpq/pqformat.h"
#include "libpq/protocol.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 |
Functions | |
static void | printtup_startup (DestReceiver *self, int operation, TupleDesc typeinfo) |
static bool | printtup (TupleTableSlot *slot, DestReceiver *self) |
static void | printtup_shutdown (DestReceiver *self) |
static void | printtup_destroy (DestReceiver *self) |
DestReceiver * | printtup_create_DR (CommandDest dest) |
void | SetRemoteDestReceiverParams (DestReceiver *self, Portal portal) |
void | SendRowDescriptionMessage (StringInfo buf, TupleDesc typeinfo, List *targetlist, int16 *formats) |
static void | printtup_prepare_info (DR_printtup *myState, TupleDesc typeinfo, int numAttrs) |
static void | printatt (unsigned attributeId, Form_pg_attribute attributeP, char *value) |
void | debugStartup (DestReceiver *self, int operation, TupleDesc typeinfo) |
bool | debugtup (TupleTableSlot *slot, DestReceiver *self) |
void debugStartup | ( | DestReceiver * | self, |
int | operation, | ||
TupleDesc | typeinfo | ||
) |
Definition at line 444 of file printtup.c.
References i, TupleDescData::natts, printatt(), printf, and TupleDescAttr.
bool debugtup | ( | TupleTableSlot * | slot, |
DestReceiver * | self | ||
) |
Definition at line 462 of file printtup.c.
References getTypeOutputInfo(), i, TupleDescData::natts, OidOutputFunctionCall(), printatt(), printf, slot_getattr(), TupleTableSlot::tts_tupleDescriptor, TupleDescAttr, and value.
Referenced by print_slot().
|
static |
Definition at line 423 of file printtup.c.
References NameStr, printf, and value.
Referenced by debugStartup(), and debugtup().
|
static |
Definition at line 304 of file printtup.c.
References DR_printtup::attrinfo, DR_printtup::buf, 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(), PqMsg_DataRow, 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().
DestReceiver* printtup_create_DR | ( | CommandDest | dest | ) |
Definition at line 71 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 250 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().
|
static |
Definition at line 389 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 111 of file printtup.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, DR_printtup::buf, CurrentMemoryContext, FetchPortalTargetList(), PortalData::formats, initStringInfo(), DR_printtup::portal, DR_printtup::sendDescrip, SendRowDescriptionMessage(), and DR_printtup::tmpcontext.
Referenced by printtup_create_DR().
void SendRowDescriptionMessage | ( | StringInfo | buf, |
TupleDesc | typeinfo, | ||
List * | targetlist, | ||
int16 * | formats | ||
) |
Definition at line 166 of file printtup.c.
References buf, enlargeStringInfo(), format, getBaseTypeAndTypmod(), i, lfirst, list_head(), lnext(), MAX_CONVERSION_GROWTH, NAMEDATALEN, NameStr, TupleDescData::natts, pq_beginmessage_reuse(), pq_endmessage_reuse(), pq_sendint16(), pq_writeint16(), pq_writeint32(), pq_writestring(), PqMsg_RowDescription, and TupleDescAttr.
Referenced by exec_describe_portal_message(), exec_describe_statement_message(), and printtup_startup().
void SetRemoteDestReceiverParams | ( | DestReceiver * | self, |
Portal | portal | ||
) |
Definition at line 100 of file printtup.c.
References Assert, DestRemote, DestRemoteExecute, _DestReceiver::mydest, DR_printtup::portal, and DR_printtup::pub.
Referenced by exec_execute_message(), and exec_simple_query().