Re: reducing NUMERIC size for 9.1

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: reducing NUMERIC size for 9.1
Дата
Msg-id 19060.1280513299@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: reducing NUMERIC size for 9.1  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: reducing NUMERIC size for 9.1  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> ....  Maybe something like this,
> obviously with a suitable comment which I haven't written yet:

>     numeric_digits = (precision + 6) / 4;
>     return (numeric_digits * sizeof(int16)) + NUMERIC_HDRSZ;

This is OK for the base-10K case, but there's still code in there
for the base-10 and base-100 cases.  Can you express this logic in
terms of DEC_DIGITS and sizeof(NumericDigit) ?  I think you might
find it was actually clearer that way, cf Polya.
        regards, tom lane


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: gincostestimate
Следующее
От: Tom Lane
Дата:
Сообщение: Re: reducing NUMERIC size for 9.1