From: | "Markus Wanner" <markus(at)bluegap(dot)ch> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | StringInfo Macros |
Date: | 2009-08-28 14:14:36 |
Message-ID: | 20090828161436.18531ajtsuzgrvws@mail.bluegap.ch |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
trying to clean up the Postgres-R code further, I would like to make
use of StringInfo and accompanying functions in libpq/pqformat.c
instead of some home-brown duplicate of it. However, I'm missing
helper macros like these (mainly for readability of the code):
#define BUFFER_START_PTR(buffer) ((buffer)->data))
#define BUFFER_END_PTR(buffer) ((buffer)->data + (buffer)->len)
#define BUFFER_CURSOR_PTR(buffer) ((buffer)->data + (buffer)->cursor)
#define BUFFER_BYTES_FREE(buffer) ((buffer)->maxlen - (buffer)->len)
#define BUFFER_BYTES_READABLE(buffer) ((buffer)->len - (buffer)->cursor)
Is there any compelling reason these don't exist (and shouldn't get
added)? IF not, I'd be happy to create a patch to add and make use of
such macros.
Regards
Markus Wanner
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2009-08-28 14:30:51 | Re: patch: Review handling of MOVE and FETCH (ToDo) |
Previous Message | Tom Lane | 2009-08-28 14:00:46 | Re: Memory context usage |