51#include "pg_config_paths.h"
117 while (inCursor < inEnd && inBuffer[inCursor])
120 if (inCursor >= inEnd)
239 "integer of size %zu not supported by pqGetInt",
272 "integer of size %zu not supported by pqPutInt",
340 "cannot allocate memory for output buffer\n");
434 "cannot allocate memory for input buffer\n");
671#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
766#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
792 "\tThis probably means the server terminated abnormally\n"
793 "\tbefore or while processing the request.");
890#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
1436 "\tThis indicates a bug in either the server being contacted\n"
1437 "\tor a proxy handling the connection. Please consider\n"
1438 "\treporting this to the maintainers of that software.\n"
1439 "\tFor more information, including instructions on how to\n"
1440 "\twork around this issue for now, visit\n"
1442 "https://www.postgresql.org/docs/devel/libpq-connect.html#LIBPQ-CONNECT-MAX-PROTOCOL-VERSION");
Datum now(PG_FUNCTION_ARGS)
#define Assert(condition)
#define PG_TEXTDOMAIN(domain)
#define dngettext(d, s, p, n)
void pqDropConnection(PGconn *conn, bool flushInput)
void pqInternalNotice(const PGNoticeHooks *hooks, const char *fmt,...)
int pqPutc(char c, PGconn *conn)
int pqReadData(PGconn *conn)
int pqPutInt(int value, size_t bytes, PGconn *conn)
int pqCheckOutBufferSpace(size_t bytes_needed, PGconn *conn)
int pqFlush(PGconn *conn)
void pqParseDone(PGconn *conn, int newInStart)
int pqReadReady(PGconn *conn)
static int pqSocketCheck(PGconn *conn, int forRead, int forWrite, pg_usec_time_t end_time)
int pqPutMsgStart(char msg_type, PGconn *conn)
int pqSkipnchar(size_t len, PGconn *conn)
int PQsocketPoll(int sock, int forRead, int forWrite, pg_usec_time_t end_time)
int pqGetc(char *result, PGconn *conn)
int pqGetInt(int *result, size_t bytes, PGconn *conn)
int PQmblen(const char *s, int encoding)
int pqWait(int forRead, int forWrite, PGconn *conn)
void libpq_append_grease_info(PGconn *conn)
int pqGets(PQExpBuffer buf, PGconn *conn)
int pqPutnchar(const void *s, size_t len, PGconn *conn)
int PQdsplen(const char *s, int encoding)
int pqCheckInBufferSpace(size_t bytes_needed, PGconn *conn)
static int pqPutMsgBytes(const void *buf, size_t len, PGconn *conn)
static int pqSendSome(PGconn *conn, int len)
pg_usec_time_t PQgetCurrentTimeUSec(void)
static int pqGets_internal(PQExpBuffer buf, PGconn *conn, bool resetbuffer)
int pqPuts(const char *s, PGconn *conn)
void libpq_append_error(PQExpBuffer errorMessage, const char *fmt,...)
int pqGetnchar(void *s, size_t len, PGconn *conn)
int PQmblenBounded(const char *s, int encoding)
void libpq_append_conn_error(PGconn *conn, const char *fmt,...)
int pqWaitTimed(int forRead, int forWrite, PGconn *conn, pg_usec_time_t end_time)
int pqGets_append(PQExpBuffer buf, PGconn *conn)
int pqWriteReady(PGconn *conn)
int pqPutMsgEnd(PGconn *conn)
bool pgtls_read_pending(PGconn *conn)
ssize_t pqsecure_write(PGconn *conn, const void *ptr, size_t len)
ssize_t pqsecure_read(PGconn *conn, void *ptr, size_t len)
void pqTraceOutputMessage(PGconn *conn, const char *message, bool toServer)
void pqTraceOutputNoTypeByteMessage(PGconn *conn, const char *message)
#define libpq_ngettext(s, p, n)
#define pqIsnonblocking(conn)
static char buf[DEFAULT_XLOG_SEG_SIZE]
#define pg_char_to_encoding
#define PG_STRERROR_R_BUFLEN
#define ALL_CONNECTION_FAILURE_ERRNOS
void resetPQExpBuffer(PQExpBuffer str)
void appendBinaryPQExpBuffer(PQExpBuffer str, const char *data, size_t datalen)
bool appendPQExpBufferVA(PQExpBuffer str, const char *fmt, va_list args)
void appendPQExpBufferChar(PQExpBuffer str, char ch)
void appendPQExpBufferStr(PQExpBuffer str, const char *data)
#define PQExpBufferBroken(str)
int pthread_mutex_unlock(pthread_mutex_t *mp)
int pthread_mutex_lock(pthread_mutex_t *mp)
#define PTHREAD_MUTEX_INITIALIZER
struct sockaddr_storage addr
PQExpBufferData errorMessage
PGNoticeHooks noticeHooks
int pg_encoding_dsplen(int encoding, const char *mbstr)
int pg_encoding_mblen(int encoding, const char *mbstr)
#define select(n, r, w, e, timeout)
int gettimeofday(struct timeval *tp, void *tzp)