Re: Add %z support to elog/ereport? - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Add %z support to elog/ereport?
Date
Msg-id 20140118002819.GA22416@awork2.anarazel.de
Whole thread Raw
In response to Re: Add %z support to elog/ereport?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Add %z support to elog/ereport?
List 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 by date:

Previous
From: Greg Stark
Date:
Subject: Re: [Lsf-pc] Linux kernel impact on PostgreSQL performance (summary v2 2014-1-17)
Next
From: Andres Freund
Date:
Subject: Re: Add %z support to elog/ereport?