"Sergey E. Koposov" <math@sai.msu.ru> writes:
> 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;
Ah, that's not going to work in 8.3 any longer. You have to change this to:
SET_VARSIZE(im, out_len+VARHDRSZ)
And you have to access the length with VARSIZE_ANY_EXHDR() (or a few other
macros but that's the most convenient).
Phew. You had me scared there.
-- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's Slony Replication
support!