Re: reducing NUMERIC size for 9.1

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: reducing NUMERIC size for 9.1
Дата
Msg-id 19479.1280437423@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:
> OK.  I think you're misinterpreting the point of that comment, which
> may mean that it needs some clarification.  By "the two byte header
> format is also used", I think I really meant "the header (and in fact
> the entire value) is just 2 bytes".  Really, the low order bits have
> neither the old interpretation nor the new interpretation: they don't
> have any interpretation at all - they're completely meaningless.
> That's what the part after the word "but" was intended to clarify.
> Every routine in numeric.c checks for NUMERIC_IS_NAN() and gives it
> some special handling before doing anything else, so NUMERIC_WEIGHT()
> and NUMERIC_DSCALE() are never called in that case.

I would suggest the comment ought to read something like
NaN values also use a two-byte header (in fact, thewhole value is always only two bytes).  The low order bits ofthe
headerword are available to store dscale, though dscaleis not currently used with NaNs.
 
        regards, tom lane


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: merge command - GSoC progress
Следующее
От: Robert Haas
Дата:
Сообщение: Re: reducing NUMERIC size for 9.1