Re: BUG #1741: %i missing in snprintf implementation

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #1741: %i missing in snprintf implementation
Дата
Msg-id 21934.1120167316@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #1741: %i missing in snprintf implementation  ("Tim Mauch" <tgmauch@yahoo.com>)
Ответы Re: BUG #1741: %i missing in snprintf implementation  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-bugs
"Tim Mauch" <tgmauch@yahoo.com> writes:
> The implementation of snprintf/vsnprintf in src/port/snprintf.c does not
> allow the use of %i ( %d equivalent ).  This likely isn't a problem for
> postgres itself, but when a program compiles with -lpq and the standard c
> libraries are not previously included the use of %i in the format string of
> snprintf causes segmentation faults.
> This is easily fixed by adding "case 'i':" to the same block of code handled
> by "case 'd':" and case 'D':" in the implementation.

We are certainly not going to buy into the assumption that our snprintf
has to support every odd feature that anyone anywhere thinks snprintf
should have :-(.  The correct response to this is to figure out how your
program's calls got linked to our snprintf, and stop that from
happening.

AFAICS, our library should be defining the global symbol pg_snprintf not
snprintf.  Can you look into why that's not happening for you?

            regards, tom lane

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

Предыдущее
От: "Tim Mauch"
Дата:
Сообщение: BUG #1741: %i missing in snprintf implementation
Следующее
От:
Дата:
Сообщение: server restart when connections thread over 155 in PostgreSQL 8.03