Re: Addition to: Trouble with initdb when the #define NAMEDATALEN = 51

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Addition to: Trouble with initdb when the #define NAMEDATALEN = 51
Дата
Msg-id 9785.989685332@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Addition to: Trouble with initdb when the #define NAMEDATALEN = 51  (Lincoln Yeoh <lyeoh@pop.jaring.my>)
Список pgsql-hackers
Lincoln Yeoh <lyeoh@pop.jaring.my> writes:
> At 12:35 AM 5/12/01 -0400, Tom Lane wrote:
>> BTW, 51 is a gratuitously wasteful setting --- given alignment
>> considerations, any value that's not a multiple of 4 is pointless.
>> (It should work ... but it's pointless.)

> Would n^2-1 or n*8 -1 be better than n^2 or n*8? 

No.  There is a pad byte involved, but it's included in NAMEDATALEN
(ie, if you set it to 64, you really get names up to 63 characters).
You want NAMEDATALEN itself to be a round number, since if it's not
the following byte(s) will just be wasted for alignment padding anyway.
        regards, tom lane


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Re: Addition to: Trouble with initdb when the #define NAMEDATALEN = 51
Следующее
От: Olivier PRENANT
Дата:
Сообщение: Re: Bug or feature?