On Mon, Nov 11, 2013 at 10:50 AM, Andres Freund <andres@2ndquadrant.com> wrote:
> 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.
I seem to recall that our %m support involves rewriting the error
string twice, which I think is actually kind of expensive if, for
example, you've got a loop around a PL/pgsql EXCEPTION block. I'd
actually like to find a way to get rid of the existing %m support,
maybe by having a flag that says "oh, and by the way append the system
error to my format string"; or by changing %m to %s and having the
caller pass system_error_string() or similar for that format position.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company