Re: [pgsql-hackers-win32] [HACKERS] snprintf causes regression tests to fail

Поиск
Список
Период
Сортировка
От Nicolai Tufar
Тема Re: [pgsql-hackers-win32] [HACKERS] snprintf causes regression tests to fail
Дата
Msg-id d80929390503012206557ba543@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [pgsql-hackers-win32] [HACKERS] snprintf causes regression tests to fail  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [pgsql-hackers-win32] [HACKERS] snprintf causes regression tests to fail
Список pgsql-patches
Tom lane wrote:
> With CVS-tip snprintf I get
> result = '3 42'
> result = '3 3505'

I get similar results:
result = '3 42'
result = '9e-313 1413754129'

Now I agree with you, it is fundamentally broken.
We need to replace this implementation.

Bruce Momjian wrote:
> I can confirm that using "%I64d" for the printf format allows the
> regression tests to pass for int8.

But snprintf.c code does not support "%I64d" construct. It must
be picking OS's vsnprintf()

Bruce Momjian wrote:
> I think FreeBSD does.

I started with FreeBSD's vsnprintf() at first
but was set back by it's complexity and decided to
modify the port/snprintf.c code. Now would you like me
to incorporate FreeBSD's one into the code.
Give me a week and I will come with the patch.

Best regards,
Nicolai Tufar

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [pgsql-hackers-win32] [HACKERS] snprintf causes regression tests to fail
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [pgsql-hackers-win32] [HACKERS] snprintf causes regression tests to fail