From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Florian Pflug <fgp(at)phlo(dot)org> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Add %z support to elog/ereport? |
Date: | 2014-01-22 03:42:29 |
Message-ID: | 26414.1390362149@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Florian Pflug <fgp(at)phlo(dot)org> writes:
> On Jan21, 2014, at 18:56 , Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Robert Haas <robertmhaas(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2014-01-22 03:49:36 | Re: [bug fix] pg_ctl always uses the same event source |
Previous Message | Rajeev rastogi | 2014-01-22 03:42:21 | Re: Patch: Show process IDs of processes holding a lock; show relation and tuple infos of a lock to acquire |