Re: Add %z support to elog/ereport?

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(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-23 16:17:47
Message-ID: 20140123161747.GF7182@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2014-01-23 11:14:05 -0500, Tom Lane wrote:
> OK, I'll take a look.

Thanks.

> > I am not too
> > happy about the runtime check as the test isn't all that meaningful, but
> > I couldn't think of anything better.
>
> Yeah, it's problematic for cross-compiles, but no more so than configure's
> existing test for "%n$" support. In practice, since both these features
> are required by C99, I think it wouldn't be such an issue for most people.

Currently we automatically fall back to our implementation if we're
cross compiling unless I am missing something, that's a bit odd, but it
should work ;)

I was wondering more about the nature of the runtime check than the fact
that it's a runtime check at all... E.g. snprintf.c simply skips over
unknown format characters and might not have been detected as faulty on
32bit platforms by that check. Which might be considered a good thing :)

Greetings,

Andres Freund

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-01-23 16:20:21 Re: Passing "direct" args of ordered-set aggs to the transition function
Previous Message Tom Lane 2014-01-23 16:14:05 Re: Add %z support to elog/ereport?