Re: VARATT_EXTERNAL_GET_POINTER is not quite there yet

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: VARATT_EXTERNAL_GET_POINTER is not quite there yet
Дата
Msg-id 11927.1203613998@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: VARATT_EXTERNAL_GET_POINTER is not quite there yet  (Gregory Stark <stark@enterprisedb.com>)
Ответы Re: VARATT_EXTERNAL_GET_POINTER is not quite there yet
Список pgsql-hackers
Gregory Stark <stark@enterprisedb.com> writes:
> "Tom Lane" <tgl@sss.pgh.pa.us> writes:
>> I can't say that I find this a nice clean solution; but does anyone have
>> a better one?

> I'm thinking instead of having struct varlena (which you're not allowed to
> safely use any members of anyways) we should just have a typedef to void*.

I don't think we could imagine eliminating the struct name, especially
not as a back-patchable solution; there would be too many random
breakages.

It might work to change struct varlena's contents to something like
char        vl_len_[4];    /* Do not touch this field directly! */char        vl_dat[1];

so that the compiler wouldn't see it as necessarily having more than
1-byte alignment.  This would also not break any existing code that is
following the rules (touching vl_dat has never been stated to be
verboten).
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ron Mayer
Дата:
Сообщение: Re: Permanent settings
Следующее
От: Tom Lane
Дата:
Сообщение: Re: TO_DATE behavior!