#include "postgres_fe.h"
#include <signal.h>
#include <time.h>
#include <unistd.h>
#include <sys/select.h>
#include <poll.h>
#include "libpq-fe.h"
#include "libpq-int.h"
#include "mb/pg_wchar.h"
#include "pg_config_paths.h"
#include "port/pg_bswap.h"
Go to the source code of this file.
Definition at line 1404 of file fe-misc.c.
References appendPQExpBufferChar(), appendPQExpBufferVA(), generate_unaccent_rules::args, Assert(), conn, pg_conn::errorMessage, libpq_gettext, and PQExpBufferBroken.
Referenced by pqReadData(), pqSocketCheck(), and pqWaitTimed().
Definition at line 1375 of file fe-misc.c.
References appendPQExpBufferChar(), appendPQExpBufferVA(), generate_unaccent_rules::args, Assert(), libpq_gettext, and PQExpBufferBroken.
Referenced by conninfo_add_defaults(), conninfo_array_parse(), conninfo_init(), conninfo_parse(), conninfo_storeval(), conninfo_uri_decode(), conninfo_uri_parse_options(), conninfo_uri_parse_params(), parseServiceFile(), parseServiceInfo(), pg_fe_getusername(), and read_attr_value().
Definition at line 351 of file fe-misc.c.
References appendPQExpBufferStr(), conn, pg_conn::errorMessage, pg_conn::inBuffer, pg_conn::inBufSize, pg_conn::inCursor, pg_conn::inEnd, pg_conn::inStart, and realloc.
Referenced by getCopyDataMessage(), PQconnectPoll(), pqFunctionCall3(), pqParseInput3(), and pqReadData().
Definition at line 287 of file fe-misc.c.
References appendPQExpBufferStr(), conn, pg_conn::errorMessage, pg_conn::outBuffer, pg_conn::outBufSize, and realloc.
Referenced by PQputCopyData(), pqPutMsgBytes(), and pqPutMsgStart().
Definition at line 1276 of file fe-misc.c.
References encoding, and pg_encoding_dsplen().
Referenced by get_prompt(), pg_wcsformat(), pg_wcssize(), pg_wcswidth(), and strlen_max_width().
Definition at line 1285 of file fe-misc.c.
References encoding, pg_char_to_encoding, PG_SQL_ASCII, and str.
Referenced by main().
Definition at line 994 of file fe-misc.c.
References conn, pg_conn::outCount, pg_conn::Pfdebug, and pqSendSome().
Referenced by pg_SASL_init(), PQconnectPoll(), PQconsumeInput(), pqEndcopy3(), PQexitPipelineMode(), PQflush(), pqFunctionCall3(), PQgetResult(), pqPacketSend(), pqPipelineFlush(), pqPipelineSyncInternal(), PQputCopyData(), PQputCopyEnd(), PQsendCancelRequest(), PQsendQueryInternal(), PQsetnonblocking(), and sendTerminateConn().
Definition at line 77 of file fe-misc.c.
References conn, pg_conn::inBuffer, pg_conn::inCursor, and pg_conn::inEnd.
Referenced by getCopyDataMessage(), getCopyStart(), getReadyForQuery(), PQconnectPoll(), pqFunctionCall3(), pqGetErrorNotice3(), and pqParseInput3().
Definition at line 1235 of file fe-misc.c.
References gettimeofday().
Referenced by pqConnectDBComplete(), PQsocketPoll(), and wait_until_connected().
Definition at line 216 of file fe-misc.c.
References conn, pg_conn::inBuffer, pg_conn::inCursor, pg_conn::inEnd, pg_conn::noticeHooks, pg_ntoh16, pg_ntoh32, and pqInternalNotice().
Referenced by getAnotherTuple(), getBackendKeyData(), getCopyDataMessage(), getCopyStart(), getNotify(), getParamDescriptions(), getRowDescriptions(), PQconnectPoll(), pqFunctionCall3(), pqGetNegotiateProtocolVersion3(), and pqParseInput3().
Definition at line 165 of file fe-misc.c.
References conn, pg_conn::inBuffer, pg_conn::inCursor, pg_conn::inEnd, and len.
Referenced by getBackendKeyData(), pg_password_sendauth(), pg_SASL_continue(), and pqFunctionCall3().
Definition at line 136 of file fe-misc.c.
References buf, conn, and pqGets_internal().
Referenced by getNotify(), getParameterStatus(), getRowDescriptions(), pg_SASL_init(), pqGetErrorNotice3(), pqGetNegotiateProtocolVersion3(), and pqParseInput3().
Definition at line 142 of file fe-misc.c.
References buf, conn, and pqGets_internal().
Referenced by PQconnectPoll().
Definition at line 109 of file fe-misc.c.
References appendBinaryPQExpBuffer(), buf, conn, pg_conn::inBuffer, pg_conn::inCursor, pg_conn::inEnd, and resetPQExpBuffer().
Referenced by pqGets(), and pqGets_append().
Definition at line 1255 of file fe-misc.c.
References encoding, and pg_encoding_mblen().
Referenced by appendStringLiteral(), get_prompt(), pg_wcsformat(), pg_wcssize(), pg_wcswidth(), psqlscan_prepare_buffer(), and strlen_max_width().
Definition at line 1266 of file fe-misc.c.
References encoding, pg_encoding_mblen(), and strnlen().
Referenced by command_no_begin(), dequote_downcase_identifier(), do_field(), patternToSQLRegex(), quote_if_needed(), reportErrorPosition(), skip_white_space(), splitTableColumnsSpec(), strip_quotes(), and strtokx().
Definition at line 443 of file fe-misc.c.
References conn, pg_conn::inBuffer, pg_conn::inStart, pg_conn::Pfdebug, and pqTraceOutputMessage().
Referenced by getCopyDataMessage(), PQconnectPoll(), pqFunctionCall3(), pqGetCopyData3(), and pqParseInput3().
Definition at line 92 of file fe-misc.c.
References conn, and pqPutMsgBytes().
Referenced by PQsendQueryGuts(), and PQsendTypedCommand().
Definition at line 253 of file fe-misc.c.
References conn, pg_conn::noticeHooks, pg_hton16, pg_hton32, pqInternalNotice(), pqPutMsgBytes(), and value.
Referenced by pg_SASL_init(), pqFunctionCall3(), PQsendPrepare(), and PQsendQueryGuts().
Definition at line 509 of file fe-misc.c.
References buf, conn, len, pg_conn::outBuffer, pg_conn::outMsgEnd, and pqCheckOutBufferSpace().
Referenced by pqPutc(), pqPutInt(), pqPutnchar(), and pqPuts().
Definition at line 532 of file fe-misc.c.
References SockAddr::addr, Assert(), conn, pg_conn::outBuffer, pg_conn::outCount, pg_conn::outMsgEnd, pg_conn::outMsgStart, pg_conn::Pfdebug, pg_hton32, pqSendSome(), pqTraceOutputMessage(), pqTraceOutputNoTypeByteMessage(), pg_conn::raddr, and pg_conn::ssl_in_use.
Referenced by pg_SASL_init(), pqEndcopy3(), pqFunctionCall3(), pqPacketSend(), pqPipelineSyncInternal(), PQputCopyData(), PQputCopyEnd(), PQsendCancelRequest(), PQsendFlushRequest(), PQsendPrepare(), PQsendQueryGuts(), PQsendQueryInternal(), PQsendTypedCommand(), and sendTerminateConn().
Definition at line 473 of file fe-misc.c.
References conn, pg_conn::outBuffer, pg_conn::outCount, pg_conn::outMsgEnd, pg_conn::outMsgStart, and pqCheckOutBufferSpace().
Referenced by pg_SASL_init(), pqEndcopy3(), pqFunctionCall3(), pqPacketSend(), pqPipelineSyncInternal(), PQputCopyData(), PQputCopyEnd(), PQsendCancelRequest(), PQsendFlushRequest(), PQsendPrepare(), PQsendQueryGuts(), PQsendQueryInternal(), PQsendTypedCommand(), and sendTerminateConn().
Definition at line 202 of file fe-misc.c.
References conn, len, and pqPutMsgBytes().
Referenced by pg_SASL_init(), pqFunctionCall3(), pqPacketSend(), PQputCopyData(), PQsendCancelRequest(), and PQsendQueryGuts().
Definition at line 152 of file fe-misc.c.
References conn, and pqPutMsgBytes().
Referenced by pg_SASL_init(), PQputCopyEnd(), PQsendPrepare(), PQsendQueryGuts(), PQsendQueryInternal(), and PQsendTypedCommand().
Definition at line 606 of file fe-misc.c.
References ALL_CONNECTION_FAILURE_ERRNOS, conn, CONNECTION_BAD, EAGAIN, EINTR, EWOULDBLOCK, pg_conn::inBuffer, pg_conn::inBufSize, pg_conn::inCursor, pg_conn::inEnd, pg_conn::inStart, libpq_append_conn_error(), PGINVALID_SOCKET, pqCheckInBufferSpace(), pqDropConnection(), pqReadReady(), pqsecure_read(), pg_conn::sock, SOCK_ERRNO, pg_conn::ssl_in_use, and pg_conn::status.
Referenced by PQcancelPoll(), PQconnectPoll(), PQconsumeInput(), pqFunctionCall3(), pqGetCopyData3(), pqGetline3(), PQgetResult(), and pqSendSome().
Definition at line 1058 of file fe-misc.c.
References conn, and pqSocketCheck().
Referenced by gss_read(), and pqReadData().
Definition at line 825 of file fe-misc.c.
References conn, EAGAIN, EINTR, EWOULDBLOCK, len, libpq_gettext, Min, pg_conn::outBuffer, pg_conn::outCount, PGINVALID_SOCKET, pqIsnonblocking, pqReadData(), pqsecure_write(), pqWait(), remaining, pg_conn::sock, SOCK_ERRNO, pg_conn::write_err_msg, and pg_conn::write_failed.
Referenced by pqFlush(), and pqPutMsgEnd().
Definition at line 187 of file fe-misc.c.
References conn, pg_conn::inCursor, pg_conn::inEnd, and len.
Referenced by getAnotherTuple().
Definition at line 1083 of file fe-misc.c.
References pg_conn::altsock, conn, EINTR, end_time, libpq_append_conn_error(), PG_STRERROR_R_BUFLEN, PGINVALID_SOCKET, pgtls_read_pending(), PQsocketPoll(), pg_conn::sock, SOCK_ERRNO, SOCK_STRERROR, and pg_conn::ssl_in_use.
Referenced by pqReadReady(), pqWaitTimed(), and pqWriteReady().
Definition at line 1141 of file fe-misc.c.
References end_time, now(), PQgetCurrentTimeUSec(), and select.
Referenced by pqSocketCheck(), timer_expired(), and wait_until_connected().
Definition at line 1019 of file fe-misc.c.
References conn, and pqWaitTimed().
Referenced by pqFunctionCall3(), pqGetCopyData3(), pqGetline3(), PQgetResult(), and pqSendSome().
Definition at line 1035 of file fe-misc.c.
References conn, end_time, libpq_append_conn_error(), and pqSocketCheck().
Referenced by pqConnectDBComplete(), and pqWait().
Definition at line 1068 of file fe-misc.c.
References conn, and pqSocketCheck().