Re: [HACKERS] Open 6.4 items

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Open 6.4 items
Дата
Msg-id 23787.907968022@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Open 6.4 items  (Tom Ivar Helbekkmo <tih@nhh.no>)
Список pgsql-hackers
Tom Ivar Helbekkmo <tih@nhh.no> writes:
> As far as I
> can tell, the only actual error in Paul Vixie's code is that the two
> lines you quote above should be:
>             else if (--size > 0)
>                 *++dst = 0, dirty = 0;

No, that's still wrong, because it will error out (jump to emsgsize)
one byte sooner than it should.  The loop is fundamentally broken
because it wants to grab and zero a byte before it knows whether there
are any digits for the byte.

I think its behavior for an odd number of digits is wrong too, or at
least pretty nonintuitive.  I like my code a lot better ;-)

            regards, tom lane

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

Предыдущее
От: Brook Milligan
Дата:
Сообщение: Re: [HACKERS] dynamic libraries
Следующее
От: jwieck@debis.com (Jan Wieck)
Дата:
Сообщение: Re: [HACKERS] PL compile warning messages