Eneboo - Documentación para desarrolladores
|
00001 /*------------------------------------------------------------------------- 00002 * 00003 * pqformat.h 00004 * Definitions for formatting and parsing frontend/backend messages 00005 * 00006 * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group 00007 * Portions Copyright (c) 1994, Regents of the University of California 00008 * 00009 * $PostgreSQL: pgsql/src/include/libpq/pqformat.h,v 1.23 2004/12/31 22:03:32 pgsql Exp $ 00010 * 00011 *------------------------------------------------------------------------- 00012 */ 00013 #ifndef PQFORMAT_H 00014 #define PQFORMAT_H 00015 00016 #include "lib/stringinfo.h" 00017 00018 extern void pq_beginmessage(StringInfo buf, char msgtype); 00019 extern void pq_sendbyte(StringInfo buf, int byt); 00020 extern void pq_sendbytes(StringInfo buf, const char *data, int datalen); 00021 extern void pq_sendcountedtext(StringInfo buf, const char *str, int slen, 00022 bool countincludesself); 00023 extern void pq_sendtext(StringInfo buf, const char *str, int slen); 00024 extern void pq_sendstring(StringInfo buf, const char *str); 00025 extern void pq_sendint(StringInfo buf, int i, int b); 00026 extern void pq_sendint64(StringInfo buf, int64 i); 00027 extern void pq_sendfloat4(StringInfo buf, float4 f); 00028 extern void pq_sendfloat8(StringInfo buf, float8 f); 00029 extern void pq_endmessage(StringInfo buf); 00030 00031 extern void pq_begintypsend(StringInfo buf); 00032 extern bytea *pq_endtypsend(StringInfo buf); 00033 00034 extern void pq_puttextmessage(char msgtype, const char *str); 00035 extern void pq_putemptymessage(char msgtype); 00036 00037 extern int pq_getmsgbyte(StringInfo msg); 00038 extern unsigned int pq_getmsgint(StringInfo msg, int b); 00039 extern int64 pq_getmsgint64(StringInfo msg); 00040 extern float4 pq_getmsgfloat4(StringInfo msg); 00041 extern float8 pq_getmsgfloat8(StringInfo msg); 00042 extern const char *pq_getmsgbytes(StringInfo msg, int datalen); 00043 extern void pq_copymsgbytes(StringInfo msg, char *buf, int datalen); 00044 extern char *pq_getmsgtext(StringInfo msg, int rawbytes, int *nbytes); 00045 extern const char *pq_getmsgstring(StringInfo msg); 00046 extern void pq_getmsgend(StringInfo msg); 00047 00048 #endif /* PQFORMAT_H */