~vcs-imports/mammoth-replicator/trunk

« back to all changes in this revision

Viewing changes to src/include/libpq/pqformat.h

  • Committer: alvherre
  • Date: 2005-12-16 21:24:52 UTC
  • Revision ID: svn-v4:db760fc0-0f08-0410-9d63-cc6633f64896:trunk:1
Initial import of the REL8_0_3 sources from the Pgsql CVS repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*-------------------------------------------------------------------------
 
2
 *
 
3
 * pqformat.h
 
4
 *              Definitions for formatting and parsing frontend/backend messages
 
5
 *
 
6
 * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
 
7
 * Portions Copyright (c) 1994, Regents of the University of California
 
8
 *
 
9
 * $PostgreSQL: pgsql/src/include/libpq/pqformat.h,v 1.23 2004-12-31 22:03:32 pgsql Exp $
 
10
 *
 
11
 *-------------------------------------------------------------------------
 
12
 */
 
13
#ifndef PQFORMAT_H
 
14
#define PQFORMAT_H
 
15
 
 
16
#include "lib/stringinfo.h"
 
17
 
 
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_sendint(StringInfo buf, int i, int b);
 
26
extern void pq_sendint64(StringInfo buf, int64 i);
 
27
extern void pq_sendfloat4(StringInfo buf, float4 f);
 
28
extern void pq_sendfloat8(StringInfo buf, float8 f);
 
29
extern void pq_endmessage(StringInfo buf);
 
30
 
 
31
extern void pq_begintypsend(StringInfo buf);
 
32
extern bytea *pq_endtypsend(StringInfo buf);
 
33
 
 
34
extern void pq_puttextmessage(char msgtype, const char *str);
 
35
extern void pq_putemptymessage(char msgtype);
 
36
 
 
37
extern int      pq_getmsgbyte(StringInfo msg);
 
38
extern unsigned int pq_getmsgint(StringInfo msg, int b);
 
39
extern int64 pq_getmsgint64(StringInfo msg);
 
40
extern float4 pq_getmsgfloat4(StringInfo msg);
 
41
extern float8 pq_getmsgfloat8(StringInfo msg);
 
42
extern const char *pq_getmsgbytes(StringInfo msg, int datalen);
 
43
extern void pq_copymsgbytes(StringInfo msg, char *buf, int datalen);
 
44
extern char *pq_getmsgtext(StringInfo msg, int rawbytes, int *nbytes);
 
45
extern const char *pq_getmsgstring(StringInfo msg);
 
46
extern void pq_getmsgend(StringInfo msg);
 
47
 
 
48
#endif   /* PQFORMAT_H */