On Wed, 20 Feb 2008, Gregory Stark wrote:
> You aren't doing anything funny in the image_in function to generate
> compressed varlenas manually are you?
No, I don't. The only thing I do there is unsigned char *in = PG_GETARG_CSTRING(0);//"AABBCCDDEE1122";//
and return the pointer to the palloced constructed standard varlena
datum with
typedef struct
{ int4 length; unsigned char data[1];
} image;
image *im = (image *) palloc(VARHDRSZ + out_len); memset(im, 0, VARHDRSZ + out_len); im->length =
out_len+ VARHDRSZ; /* fill the im->data ....... */ PG_RETURN_POINTER(im);
Regards, Sergey
*******************************************************************
Sergey E. Koposov
Max Planck Institute for Astronomy/Cambridge Institute for Astronomy/Sternberg Astronomical Institute
Tel: +49-6221-528-349
Web: http://lnfm1.sai.msu.ru/~math
E-mail: math@sai.msu.ru