1999-04-25 05:19:27 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
|
|
|
* pqformat.h
|
|
|
|
* Definitions for formatting and parsing frontend/backend messages
|
|
|
|
*
|
2000-01-26 06:58:53 +01:00
|
|
|
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1999-04-25 05:19:27 +02:00
|
|
|
*
|
2000-01-26 06:58:53 +01:00
|
|
|
* $Id: pqformat.h,v 1.7 2000/01/26 05:58:12 momjian Exp $
|
1999-04-25 05:19:27 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef PQFORMAT_H
|
|
|
|
#define PQFORMAT_H
|
|
|
|
|
|
|
|
#include "lib/stringinfo.h"
|
|
|
|
|
|
|
|
#define pq_beginmessage(buf) initStringInfo(buf)
|
|
|
|
|
1999-05-25 18:15:34 +02:00
|
|
|
extern void pq_sendbyte(StringInfo buf, int byt);
|
|
|
|
extern void pq_sendbytes(StringInfo buf, const char *data, int datalen);
|
|
|
|
extern void pq_sendcountedtext(StringInfo buf, const char *str, int slen);
|
|
|
|
extern void pq_sendstring(StringInfo buf, const char *str);
|
|
|
|
extern void pq_sendint(StringInfo buf, int i, int b);
|
|
|
|
extern void pq_endmessage(StringInfo buf);
|
1999-04-25 05:19:27 +02:00
|
|
|
|
1999-04-25 23:50:58 +02:00
|
|
|
extern int pq_puttextmessage(char msgtype, const char *str);
|
|
|
|
|
1999-04-25 05:19:27 +02:00
|
|
|
extern int pq_getint(int *result, int b);
|
1999-08-31 06:26:40 +02:00
|
|
|
extern int pq_getstr(StringInfo s);
|
1999-04-25 05:19:27 +02:00
|
|
|
|
|
|
|
#endif /* PQFORMAT_H */
|