Re: Add %z support to elog/ereport?

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Add %z support to elog/ereport?
Дата
Msg-id 20140118002819.GA22416@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: Add %z support to elog/ereport?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Add %z support to elog/ereport?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

On 2014-01-17 13:50:08 -0500, Tom Lane wrote:
> I think a better solution approach is to teach our src/port/snprintf.c
> about the z flag, then extend configure's checking to force use of our
> snprintf if the platform's version doesn't handle z.  While it might be
> objected that this creates a need for a run-time check in configure,
> we already have one to check if snprintf handles "n$", so this approach
> doesn't really make life any worse for cross-compiles.

Hm. I had thought about that, but dismissed it because I thought people
would argue about it being too invasive...
If we're going there, we should just eliminate expand_fmt_string() from
elog.c and test for it in configure too, right?

> You suggest below that we could invent some additional
> macros to support that; but since the "z" flag is in C99, there really
> ought to be only a small minority of platforms where it doesn't work.

Well, maybe just a minority numberwise, but one of them being windows
surely makes it count in number of installations...

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: [Lsf-pc] Linux kernel impact on PostgreSQL performance (summary v2 2014-1-17)
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Add %z support to elog/ereport?