Lonnie Cumberland writes:
> I now have a simple question about the use of these VARDATA() VARSIZE() and
> VARHDRSZ() wrappers
VARDATA is a pointer (to char?) to where the actual data of the specific
value starts. VARSIZE is the length of the specific value, plus the
header. VARHRDZ is the size of the header, currently always 4. For
example, if you have a text string 'abc' then the memory representation is
int 4 <-- text* points here
char 'a' <-- VARDATA points here
char 'b'
char 'c'
VARHDRZ == 4, VARSIZE = 7
Note that the data is not null-terminated.
The best things might be not to mess with this but call textin() and
textout() to convert your data to C strings.
--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter