port/snprintf.c (was Re: Numeric 508 datatype)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема port/snprintf.c (was Re: Numeric 508 datatype)
Дата
Msg-id 12273.1133751015@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Numeric 508 datatype  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: port/snprintf.c (was Re: Numeric 508 datatype)  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-patches
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> OK, snprintf.c fixed.  I added a 'stream' and outlen parameter to all
> the calls, and cleaned up the switch() statement that was outputing
> twice.  When we were outputing just to a string, it didn't matter, but
> now that we are also outputting to a stream, it does.

I found a whole bunch more problems than this :-(.  I've committed a
cleaned-up version that seems to work correctly in a simple standalone
testbed, but it'd be a good idea to exercise it inside PG as well.
Can you try regression tests and the factorial() problem on CVS tip?

The problems are sufficiently bad that it might be a good idea to
backport the fixes into 8.0 and before as well --- but I note that
the ABI is different (pg_snprintf vs snprintf, etc) so this requires
a bit of investigation rather than just committing the file as-is.

            regards, tom lane

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

Предыдущее
От: Guillaume LELARGE
Дата:
Сообщение: Re: French po files
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: TODO item -- Improve psql's handling of multi-line queries