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

From Andres Freund
Subject Add %z support to elog/ereport?
Date
Msg-id 20131111155029.GC2401@awork2.anarazel.de
Whole thread Raw
Responses Re: Add %z support to elog/ereport?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Add %z support to elog/ereport?  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Hi,

I'd like to add support for the length modifier %z. Linux' manpages
describes it as:z      A  following  integer conversion corresponds to a size_t or ssize_t argument.

Since gcc's printf format checks understand it, we can add support for
it similar to the way we added %m support.

Currently we just deal with wanting to print size_t/Size values by
casting them to uint32, uint64 or similar, but that's a) annoying
because 64bit numbers require the annoying UINT64_FORMAT b) more and
more likely to be problematic when casting to 32bit numbers.

Does anybody see prolbems with that?

Greetings,

Andres Freund

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



pgsql-hackers by date:

Previous
From: David Johnston
Date:
Subject: Re: TABLE not synonymous with SELECT * FROM?
Next
From: Tom Lane
Date:
Subject: Re: Execute query with EXCEPT, INTERSECT as anti-join, join?