PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <sys/param.h>
#include "libpq/libpq.h"
#include "libpq/pqformat.h"
#include "mb/pg_wchar.h"
#include "port/pg_bswap.h"
Go to the source code of this file.
void pq_beginmessage | ( | StringInfo | buf, |
char | msgtype | ||
) |
Definition at line 87 of file pqformat.c.
References StringInfoData::cursor, and initStringInfo().
Referenced by NotifyMyFrontEnd(), ParallelWorkerMain(), perform_base_backup(), PostgresMain(), printsimple(), printsimple_startup(), ReadyForQuery(), ReceiveCopyBegin(), ReportGUCOption(), send_message_to_frontend(), sendAuthRequest(), SendBackupHeader(), SendBackupManifest(), SendCopyBegin(), SendFunctionResult(), SendNegotiateProtocolVersion(), SendTimeLineHistory(), SendXlogRecPtrResult(), StartLogicalReplication(), and StartReplication().
void pq_beginmessage_reuse | ( | StringInfo | buf, |
char | msgtype | ||
) |
Definition at line 108 of file pqformat.c.
References StringInfoData::cursor, and resetStringInfo().
Referenced by exec_describe_statement_message(), printtup(), printtup_20(), printtup_internal_20(), and SendRowDescriptionMessage().
void pq_begintypsend | ( | StringInfo | buf | ) |
Definition at line 328 of file pqformat.c.
References appendStringInfoCharMacro, and initStringInfo().
Referenced by array_send(), boolsend(), box_send(), cash_send(), charsend(), cidsend(), circle_send(), complex_send(), cstring_send(), date_send(), enum_send(), float4send(), float8send(), hstore_send(), int2send(), int4send(), int8_avg_serialize(), int8send(), interval_send(), json_send(), jsonb_send(), jsonpath_send(), line_send(), lquery_send(), lseg_send(), ltree_send(), ltxtq_send(), macaddr8_send(), macaddr_send(), multirange_send(), namesend(), network_send(), numeric_avg_serialize(), numeric_poly_serialize(), numeric_send(), numeric_serialize(), oidsend(), path_send(), pg_lsn_send(), pg_snapshot_send(), point_send(), poly_send(), pq_sendint(), range_send(), record_send(), textsend(), tidsend(), time_send(), timestamp_send(), timestamptz_send(), timetz_send(), tsquerysend(), tsvectorsend(), unknownsend(), uuid_send(), varbit_send(), void_send(), xid8send(), xidsend(), and xml_send().
void pq_copymsgbytes | ( | StringInfo | msg, |
char * | buf, | ||
int | datalen | ||
) |
Definition at line 530 of file pqformat.c.
References StringInfoData::cursor, StringInfoData::data, ereport, errcode(), errmsg(), ERROR, and StringInfoData::len.
Referenced by bit_recv(), bytearecv(), CopyGetData(), logicalrep_read_tuple(), pq_getmsgint(), pq_getmsgint64(), pq_sendint(), and varbit_recv().
void pq_endmessage | ( | StringInfo | buf | ) |
Definition at line 298 of file pqformat.c.
References StringInfoData::cursor, StringInfoData::data, StringInfoData::len, pfree(), and pq_putmessage.
Referenced by HandleParallelMessage(), NotifyMyFrontEnd(), ParallelWorkerMain(), perform_base_backup(), PostgresMain(), printsimple(), printsimple_startup(), ReadyForQuery(), ReceiveCopyBegin(), ReportGUCOption(), send_message_to_frontend(), sendAuthRequest(), SendBackupHeader(), SendBackupManifest(), SendCopyBegin(), SendFunctionResult(), SendNegotiateProtocolVersion(), SendTimeLineHistory(), SendXlogRecPtrResult(), StartLogicalReplication(), and StartReplication().
void pq_endmessage_reuse | ( | StringInfo | buf | ) |
Definition at line 316 of file pqformat.c.
References StringInfoData::cursor, StringInfoData::data, StringInfoData::len, and pq_putmessage.
Referenced by exec_describe_statement_message(), printtup(), printtup_20(), printtup_internal_20(), and SendRowDescriptionMessage().
bytea* pq_endtypsend | ( | StringInfo | buf | ) |
Definition at line 348 of file pqformat.c.
References Assert, StringInfoData::data, StringInfoData::len, SET_VARSIZE, and VARHDRSZ.
Referenced by array_send(), boolsend(), box_send(), cash_send(), charsend(), cidsend(), circle_send(), complex_send(), cstring_send(), date_send(), enum_send(), float4send(), float8send(), hstore_send(), int2send(), int4send(), int8_avg_serialize(), int8send(), interval_send(), json_send(), jsonb_send(), jsonpath_send(), line_send(), lquery_send(), lseg_send(), ltree_send(), ltxtq_send(), macaddr8_send(), macaddr_send(), multirange_send(), namesend(), network_send(), numeric_avg_serialize(), numeric_poly_serialize(), numeric_send(), numeric_serialize(), oidsend(), path_send(), pg_lsn_send(), pg_snapshot_send(), point_send(), poly_send(), pq_sendint(), range_send(), record_send(), textsend(), tidsend(), time_send(), timestamp_send(), timestamptz_send(), timetz_send(), tsquerysend(), tsvectorsend(), unknownsend(), uuid_send(), varbit_send(), void_send(), xid8send(), xidsend(), and xml_send().
int pq_getmsgbyte | ( | StringInfo | msg | ) |
Definition at line 401 of file pqformat.c.
References StringInfoData::cursor, StringInfoData::data, ereport, errcode(), errmsg(), ERROR, and StringInfoData::len.
Referenced by apply_dispatch(), boolrecv(), charrecv(), HandleParallelMessage(), logicalrep_read_attrs(), logicalrep_read_commit(), logicalrep_read_delete(), logicalrep_read_insert(), logicalrep_read_rel(), logicalrep_read_stream_commit(), logicalrep_read_stream_start(), logicalrep_read_tuple(), logicalrep_read_update(), LogicalRepApplyLoop(), macaddr8_recv(), macaddr_recv(), network_recv(), path_recv(), PostgresMain(), pq_parse_errornotice(), pq_sendint(), ProcessStandbyMessage(), ProcessStandbyReplyMessage(), range_recv(), and XLogWalRcvProcessMsg().
const char* pq_getmsgbytes | ( | StringInfo | msg, |
int | datalen | ||
) |
Definition at line 510 of file pqformat.c.
References StringInfoData::cursor, StringInfoData::data, ereport, errcode(), errmsg(), ERROR, and StringInfoData::len.
Referenced by CheckSCRAMAuth(), exec_bind_message(), multirange_recv(), parse_fcall_arguments(), parse_fcall_arguments_20(), pq_sendint(), range_recv(), uuid_recv(), and xml_recv().
void pq_getmsgend | ( | StringInfo | msg | ) |
Definition at line 637 of file pqformat.c.
References StringInfoData::cursor, ereport, errcode(), errmsg(), ERROR, and StringInfoData::len.
Referenced by CheckSCRAMAuth(), exec_bind_message(), HandleFunctionRequest(), HandleParallelMessage(), int8_avg_deserialize(), multirange_recv(), numeric_avg_deserialize(), numeric_deserialize(), numeric_poly_deserialize(), PostgresMain(), pq_parse_errornotice(), pq_sendint(), and range_recv().
float4 pq_getmsgfloat4 | ( | StringInfo | msg | ) |
Definition at line 471 of file pqformat.c.
References i, pq_getmsgint(), and swap.
Referenced by float4recv(), and pq_sendint().
float8 pq_getmsgfloat8 | ( | StringInfo | msg | ) |
Definition at line 490 of file pqformat.c.
References i, pq_getmsgint64(), and swap.
Referenced by box_recv(), circle_recv(), complex_recv(), float8recv(), line_recv(), lseg_recv(), path_recv(), point_recv(), poly_recv(), and pq_sendint().
unsigned int pq_getmsgint | ( | StringInfo | msg, |
int | b | ||
) |
Definition at line 417 of file pqformat.c.
References elog, ERROR, pg_ntoh16, pg_ntoh32, and pq_copymsgbytes().
Referenced by array_recv(), bit_recv(), CheckSCRAMAuth(), cidrecv(), date_recv(), exec_bind_message(), handle_streamed_transaction(), HandleFunctionRequest(), HandleParallelMessage(), hstore_recv(), int2recv(), int4recv(), interval_recv(), jsonb_recv(), jsonpath_recv(), logicalrep_read_attrs(), logicalrep_read_begin(), logicalrep_read_delete(), logicalrep_read_insert(), logicalrep_read_rel(), logicalrep_read_stream_abort(), logicalrep_read_stream_commit(), logicalrep_read_stream_start(), logicalrep_read_truncate(), logicalrep_read_tuple(), logicalrep_read_typ(), logicalrep_read_update(), lquery_recv(), ltree_recv(), ltxtq_recv(), multirange_recv(), numeric_avg_deserialize(), numeric_deserialize(), numeric_recv(), oidrecv(), parse_fcall_arguments(), parse_fcall_arguments_20(), path_recv(), pg_snapshot_recv(), poly_recv(), PostgresMain(), pq_getmsgfloat4(), pq_sendint(), ProcessStandbyHSFeedbackMessage(), range_recv(), ReadArrayBinary(), record_recv(), tidrecv(), timetz_recv(), tsqueryrecv(), tsvectorrecv(), varbit_recv(), and xidrecv().
int64 pq_getmsgint64 | ( | StringInfo | msg | ) |
Definition at line 455 of file pqformat.c.
References pg_ntoh64, and pq_copymsgbytes().
Referenced by cash_recv(), int8_avg_deserialize(), int8recv(), interval_recv(), logicalrep_read_begin(), logicalrep_read_commit(), logicalrep_read_origin(), logicalrep_read_stream_commit(), LogicalRepApplyLoop(), numeric_avg_deserialize(), numeric_deserialize(), numeric_poly_deserialize(), pg_lsn_recv(), pg_snapshot_recv(), pq_getmsgfloat8(), pq_sendint(), ProcessStandbyHSFeedbackMessage(), ProcessStandbyReplyMessage(), time_recv(), timestamp_recv(), timestamptz_recv(), timetz_recv(), xid8recv(), and XLogWalRcvProcessMsg().
const char* pq_getmsgrawstring | ( | StringInfo | msg | ) |
Definition at line 610 of file pqformat.c.
References StringInfoData::cursor, StringInfoData::data, ereport, errcode(), errmsg(), ERROR, StringInfoData::len, and generate_unaccent_rules::str.
Referenced by CheckSCRAMAuth(), HandleParallelMessage(), pq_parse_errornotice(), and pq_sendint().
const char* pq_getmsgstring | ( | StringInfo | msg | ) |
Definition at line 581 of file pqformat.c.
References StringInfoData::cursor, StringInfoData::data, ereport, errcode(), errmsg(), ERROR, StringInfoData::len, pg_client_to_server(), and generate_unaccent_rules::str.
Referenced by CopyGetData(), exec_bind_message(), HandleFunctionRequest(), logicalrep_read_attrs(), logicalrep_read_namespace(), logicalrep_read_origin(), logicalrep_read_rel(), logicalrep_read_typ(), PostgresMain(), pq_sendint(), tsqueryrecv(), and tsvectorrecv().
char* pq_getmsgtext | ( | StringInfo | msg, |
int | rawbytes, | ||
int * | nbytes | ||
) |
Definition at line 548 of file pqformat.c.
References StringInfoData::cursor, StringInfoData::data, ereport, errcode(), errmsg(), ERROR, StringInfoData::len, palloc(), pg_client_to_server(), and generate_unaccent_rules::str.
Referenced by bpcharrecv(), cstring_recv(), enum_recv(), hstore_recv(), json_recv(), jsonb_recv(), jsonpath_recv(), lquery_recv(), ltree_recv(), ltxtq_recv(), namerecv(), pq_sendint(), textrecv(), unknownrecv(), and varcharrecv().
void pq_putemptymessage | ( | char | msgtype | ) |
Definition at line 390 of file pqformat.c.
References pq_putmessage.
Referenced by exec_bind_message(), exec_describe_portal_message(), exec_describe_statement_message(), exec_execute_message(), exec_parse_message(), NullCommand(), perform_base_backup(), PostgresMain(), pq_sendint(), ReadyForQuery(), ReceiveCopyBegin(), SendBackupManifest(), SendCopyBegin(), and SendCopyEnd().
void pq_puttextmessage | ( | char | msgtype, |
const char * | str | ||
) |
Definition at line 369 of file pqformat.c.
References pfree(), pg_server_to_client(), and pq_putmessage.
Referenced by pq_sendint(), printtup_startup(), SendBackupHeader(), and SendXlogRecPtrResult().
void pq_send_ascii_string | ( | StringInfo | buf, |
const char * | str | ||
) |
Definition at line 229 of file pqformat.c.
References appendStringInfoChar(), appendStringInfoCharMacro, and IS_HIGHBIT_SET.
Referenced by err_sendstring().
void pq_sendbytes | ( | StringInfo | buf, |
const char * | data, | ||
int | datalen | ||
) |
Definition at line 125 of file pqformat.c.
References appendBinaryStringInfo().
Referenced by array_send(), int8_avg_serialize(), logicalrep_write_tuple(), multirange_send(), numeric_avg_serialize(), numeric_poly_serialize(), numeric_serialize(), printtup(), printtup_internal_20(), range_send(), record_send(), send_int8_string(), sendAuthRequest(), SendBackupHeader(), SendFunctionResult(), SendTimeLineHistory(), SendXlogRecPtrResult(), uuid_send(), and varbit_send().
void pq_sendcountedtext | ( | StringInfo | buf, |
const char * | str, | ||
int | slen, | ||
bool | countincludesself | ||
) |
Definition at line 142 of file pqformat.c.
References appendBinaryStringInfoNT(), pfree(), pg_server_to_client(), and pq_sendint32().
Referenced by logicalrep_write_tuple(), printsimple(), printtup(), printtup_20(), and SendFunctionResult().
void pq_sendfloat4 | ( | StringInfo | buf, |
float4 | f | ||
) |
Definition at line 254 of file pqformat.c.
References i, pq_sendint32(), and swap.
Referenced by float4send().
void pq_sendfloat8 | ( | StringInfo | buf, |
float8 | f | ||
) |
Definition at line 278 of file pqformat.c.
References i, pq_sendint64(), and swap.
Referenced by box_send(), circle_send(), complex_send(), float8send(), line_send(), lseg_send(), path_send(), point_send(), and poly_send().
void pq_sendstring | ( | StringInfo | buf, |
const char * | str | ||
) |
Definition at line 197 of file pqformat.c.
References appendBinaryStringInfoNT(), pfree(), and pg_server_to_client().
Referenced by err_sendstring(), logicalrep_write_attrs(), logicalrep_write_namespace(), logicalrep_write_origin(), logicalrep_write_rel(), logicalrep_write_typ(), NotifyMyFrontEnd(), printsimple_startup(), ReportGUCOption(), SendBackupHeader(), SendNegotiateProtocolVersion(), SendRowDescriptionCols_2(), SendTimeLineHistory(), SendXlogRecPtrResult(), and tsquerysend().
void pq_sendtext | ( | StringInfo | buf, |
const char * | str, | ||
int | slen | ||
) |
Definition at line 174 of file pqformat.c.
References appendBinaryStringInfo(), pfree(), and pg_server_to_client().
Referenced by cstring_send(), enum_send(), hstore_send(), json_send(), jsonb_send(), jsonpath_send(), lquery_send(), ltree_send(), ltxtq_send(), namesend(), textsend(), tsvectorsend(), unknownsend(), and xml_send().