Re: Add %z support to elog/ereport?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
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 19:50:57
Message-ID: 7778.1390506657@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> I checked on my HPUX box and find that what it prints for "%zu" is
> "zu", confirming my thought that it'd just abandon processing of the
> %-sequence. (Interesting that it doesn't eat the "z" while doing
> so, though.)

Further testing on that box shows that its ancient gcc (2.95.3) doesn't
know "z" either, which means that the patch produces a boatload of
compile warnings like this:

mcxt.c: In function `MemoryContextAllocZero':
mcxt.c:605: warning: unknown conversion type character `z' in format
mcxt.c:605: warning: too many arguments for format

While I am not really expecting this gcc to compile PG cleanly anymore,
the idea that we might get many dozen such warnings on more-current
compilers is scarier, as that might well interfere with people's
ability to do development on, say, Windows. Could somebody check
whether MSVC for instance complains about format strings using "z"?
Or shall I just commit this and we'll see what the buildfarm says?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2014-01-23 20:16:06 Re: Warning in new GIN code
Previous Message Heikki Linnakangas 2014-01-23 19:41:19 Re: [COMMITTERS] pgsql: Compress GIN posting lists, for smaller index size.