| 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:48:39 |
| Message-ID: | 20140123164839.GG7182@awork2.anarazel.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 2014-01-23 11:25:56 -0500, Tom Lane wrote:
> Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> > 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 :)
>
> Oh ... gotcha. Yeah, it's possible that snprintf would behave in a way
> that masks the fact that it doesn't really recognize the "z" flag, but
> that seems rather unlikely to me. More likely it would abandon processing
> the %-sequence on grounds it's malformed.
Yea, hopefully.
> I will try the patch on my old HPUX dinosaur, which I'm pretty sure
> does not know "z", and verify this is the case.
I don't know how, but I've introduced a typo in the version I sent if
you haven't noticed yet, there's a " missing in
PGAC_FUNC_PRINTF_SIZE_T_SUPPORT. "%zu" instead of "%zu
> Also, I'm guessing Windows' version of snprintf doesn't have "z" either.
> Could someone try the patch's configure test program on Windows and see
> what the result is?
I've attached a version of that here, for $windowsperson's
convenience. I hope I got the llp stuff right...
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
| Attachment | Content-Type | Size |
|---|---|---|
| conftest.c | text/plain | 550 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2014-01-23 16:50:57 | Re: Changeset Extraction v7.0 (was logical changeset generation) |
| Previous Message | Florian Pflug | 2014-01-23 16:40:52 | Re: Passing "direct" args of ordered-set aggs to the transition function |