Re: failed assertion in toasting code
| От | Gregory Stark |
|---|---|
| Тема | Re: failed assertion in toasting code |
| Дата | |
| Msg-id | 87d4qrx0a3.fsf@oxford.xeocode.com обсуждение исходный текст |
| Ответ на | Re: failed assertion in toasting code ("Sergey E. Koposov" <math@sai.msu.ru>) |
| Ответы |
Re: failed assertion in toasting code
|
| Список | pgsql-hackers |
"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!
В списке pgsql-hackers по дате отправления: