97 buf->cursor = msgtype;
118 buf->cursor = msgtype;
197 int slen = strlen(
str);
369 int slen = strlen(
str);
403 (
errcode(ERRCODE_PROTOCOL_VIOLATION),
404 errmsg(
"no data left in message")));
405 return (
unsigned char) msg->
data[msg->
cursor++];
437 elog(
ERROR,
"unsupported integer size %d",
b);
512 if (datalen < 0 || datalen > (msg->
len - msg->
cursor))
514 (
errcode(ERRCODE_PROTOCOL_VIOLATION),
515 errmsg(
"insufficient data left in message")));
530 if (datalen < 0 || datalen > (msg->
len - msg->
cursor))
532 (
errcode(ERRCODE_PROTOCOL_VIOLATION),
533 errmsg(
"insufficient data left in message")));
551 if (rawbytes < 0 || rawbytes > (msg->
len - msg->
cursor))
553 (
errcode(ERRCODE_PROTOCOL_VIOLATION),
554 errmsg(
"insufficient data left in message")));
563 p = (
char *)
palloc(rawbytes + 1);
564 memcpy(p,
str, rawbytes);
594 (
errcode(ERRCODE_PROTOCOL_VIOLATION),
595 errmsg(
"invalid string in message")));
623 (
errcode(ERRCODE_PROTOCOL_VIOLATION),
624 errmsg(
"invalid string in message")));
639 (
errcode(ERRCODE_PROTOCOL_VIOLATION),
640 errmsg(
"invalid message format")));
#define IS_HIGHBIT_SET(ch)
#define Assert(condition)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define pq_putmessage(msgtype, s, len)
char * pg_client_to_server(const char *s, int len)
char * pg_server_to_client(const char *s, int len)
void pfree(void *pointer)
void resetStringInfo(StringInfo str)
void appendBinaryStringInfoNT(StringInfo str, const void *data, int datalen)
void appendBinaryStringInfo(StringInfo str, const void *data, int datalen)
void appendStringInfoChar(StringInfo str, char ch)
void initStringInfo(StringInfo str)
#define appendStringInfoCharMacro(str, ch)
#define SET_VARSIZE(PTR, len)