diff options
| author | Tom Lane | 2003-04-19 00:02:30 +0000 |
|---|---|---|
| committer | Tom Lane | 2003-04-19 00:02:30 +0000 |
| commit | bd8d4417757b1f3edd9ef36897cf47fe96b6e37a (patch) | |
| tree | 82da2e02e8b0b4ae5f3c19370bce7f7e74cd9136 /src/include/lib | |
| parent | 54b38d293eb8ab925b3acc7270847fcf35caf912 (diff) | |
Second round of FE/BE protocol changes. Frontend->backend messages now
have length counts, and COPY IN data is packetized into messages.
Diffstat (limited to 'src/include/lib')
| -rw-r--r-- | src/include/lib/stringinfo.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/include/lib/stringinfo.h b/src/include/lib/stringinfo.h index 051ce239a7..c49a73c0eb 100644 --- a/src/include/lib/stringinfo.h +++ b/src/include/lib/stringinfo.h @@ -10,7 +10,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: stringinfo.h,v 1.24 2002/06/20 20:29:49 momjian Exp $ + * $Id: stringinfo.h,v 1.25 2003/04/19 00:02:29 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -27,6 +27,9 @@ * string size (including the terminating '\0' char) that we can * currently store in 'data' without having to reallocate * more space. We must always have maxlen > len. + * cursor is initialized to zero by makeStringInfo or initStringInfo, + * but is not otherwise touched by the stringinfo.c routines. + * Some routines use it to scan through a StringInfo. *------------------------- */ typedef struct StringInfoData @@ -34,6 +37,7 @@ typedef struct StringInfoData char *data; int len; int maxlen; + int cursor; } StringInfoData; typedef StringInfoData *StringInfo; @@ -111,4 +115,10 @@ extern void appendStringInfoChar(StringInfo str, char ch); extern void appendBinaryStringInfo(StringInfo str, const char *data, int datalen); +/*------------------------ + * enlargeStringInfo + * Make sure a StringInfo's buffer can hold at least 'needed' more bytes. + */ +extern void enlargeStringInfo(StringInfo str, int needed); + #endif /* STRINGINFO_H */ |
