Re: Add %z support to elog/ereport?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Add %z support to elog/ereport?
Дата
Msg-id 26414.1390362149@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Add %z support to elog/ereport?  (Florian Pflug <fgp@phlo.org>)
Список pgsql-hackers
Florian Pflug <fgp@phlo.org> writes:
> On Jan21, 2014, at 18:56 , Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Robert Haas <robertmhaas@gmail.com> writes:
>>> it wouldn't play nice with GCC's desire to check format strings.

>> That last is a deal-breaker.  It's not just whether "gcc desires" to check
>> this --- we *need* that checking, because people get it wrong without it.

> There's an attribute that enables this check for arbitrary functions AFAIR.

Yeah, we use it (to enable checking for ereport et al).  The issue is that
the semantics of the format-string are pretty much hard-wired into gcc;
eg it knows that "%ld" should match an argument of type "long int".

IIRC it does know a couple of different styles corresponding to popular
libc implementations ... but it is not going to support some random
semantics that we dream up.
        regards, tom lane



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: [bug fix] pg_ctl always uses the same event source
Следующее
От: Rajeev rastogi
Дата:
Сообщение: Re: Patch: Show process IDs of processes holding a lock; show relation and tuple infos of a lock to acquire