Re: Plan for compressed varlena headers

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Plan for compressed varlena headers
Дата
Msg-id 9771.1171502028@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Plan for compressed varlena headers  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-hackers
Gregory Stark <stark@enterprisedb.com> writes:
> "Tom Lane" <tgl@sss.pgh.pa.us> writes:
>> Plus you can't do it without multiple evaluation of the macro argument,

> I don't see any way to do VARSIZE without multiply evaluating its argument.

Some variant of
#define VARSIZE(x)    (ntohl((x)->vl_len) & 0x3fffffff)#define VARSIZE(x)    ((x)->vl_len >> 2)

The 1-or-4-byte version is a lot harder, but also will be used in a lot
fewer places, all of which will get looked at when it gets installed.
I'm prepared to put up with multiple eval for that.  I *don't* want to
assume that existing code can tolerate multiple eval in a macro that has
existed forever and never did it before.
        regards, tom lane


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

Предыдущее
От: Gregory Stark
Дата:
Сообщение: Re: Plan for compressed varlena headers
Следующее
От: elein
Дата:
Сообщение: Re: Variable length varlena headers redux