Fix xslt_process() to ensure that it inserts a NULL terminator after the
[PostgreSQL.git] / src / include / libpq / pqformat.h
blob87909ba18769ec51ece08061b3fdbb8f36b3d147
1 /*-------------------------------------------------------------------------
3 * pqformat.h
4 * Definitions for formatting and parsing frontend/backend messages
6 * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
9 * $PostgreSQL$
11 *-------------------------------------------------------------------------
13 #ifndef PQFORMAT_H
14 #define PQFORMAT_H
16 #include "lib/stringinfo.h"
18 extern void pq_beginmessage(StringInfo buf, char msgtype);
19 extern void pq_sendbyte(StringInfo buf, int byt);
20 extern void pq_sendbytes(StringInfo buf, const char *data, int datalen);
21 extern void pq_sendcountedtext(StringInfo buf, const char *str, int slen,
22 bool countincludesself);
23 extern void pq_sendtext(StringInfo buf, const char *str, int slen);
24 extern void pq_sendstring(StringInfo buf, const char *str);
25 extern void pq_send_ascii_string(StringInfo buf, const char *str);
26 extern void pq_sendint(StringInfo buf, int i, int b);
27 extern void pq_sendint64(StringInfo buf, int64 i);
28 extern void pq_sendfloat4(StringInfo buf, float4 f);
29 extern void pq_sendfloat8(StringInfo buf, float8 f);
30 extern void pq_endmessage(StringInfo buf);
32 extern void pq_begintypsend(StringInfo buf);
33 extern bytea *pq_endtypsend(StringInfo buf);
35 extern void pq_puttextmessage(char msgtype, const char *str);
36 extern void pq_putemptymessage(char msgtype);
38 extern int pq_getmsgbyte(StringInfo msg);
39 extern unsigned int pq_getmsgint(StringInfo msg, int b);
40 extern int64 pq_getmsgint64(StringInfo msg);
41 extern float4 pq_getmsgfloat4(StringInfo msg);
42 extern float8 pq_getmsgfloat8(StringInfo msg);
43 extern const char *pq_getmsgbytes(StringInfo msg, int datalen);
44 extern void pq_copymsgbytes(StringInfo msg, char *buf, int datalen);
45 extern char *pq_getmsgtext(StringInfo msg, int rawbytes, int *nbytes);
46 extern const char *pq_getmsgstring(StringInfo msg);
47 extern void pq_getmsgend(StringInfo msg);
49 #endif /* PQFORMAT_H */