"Sergey E. Koposov" <[EMAIL PROTECTED]> 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!

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

                http://www.postgresql.org/about/donate

Reply via email to