Re: [COMMITTERS] pgsql/src/backend/lib (stringinfo.c)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [COMMITTERS] pgsql/src/backend/lib (stringinfo.c)
Дата
Msg-id 6992.936884675@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql/src/backend/lib (stringinfo.c)  (Thomas Lockhart <lockhart@alumni.caltech.edu>)
Список pgsql-hackers
Thomas Lockhart <lockhart@alumni.caltech.edu> writes:
>> Cope with versions of vsnprintf() written by people who
>> don't read man pages...

> RETURN VALUE
>        If the output was truncated, the return value is -1,
>        otherwise it is  the  number  of  characters  stored,  not
>        including the terminating null.

> Is this consistant with the behavior you see on Linux? It's a GNU
> library thing...

That is the behavior I saw on my Linux box, but the manpage installed
on the same box sez that the return value is equal to the passed buffer
size if there's an overrun.  Maybe the manpage is out of date.

Anyway, the fixed code copes with both conventions.

You'll need to re-initdb to get rid of the broken rules in your
database, but then things should be OK...
        regards, tom lane


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

Предыдущее
От: Thomas Lockhart
Дата:
Сообщение: Re: [HACKERS] Re: Problem enabling pltcl
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Vacuum analyze bug CAUGHT