Re: Support for XLogRecPtr in expand_fmt_string?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Subject: Re: Support for XLogRecPtr in expand_fmt_string?
Date: 2012-07-03 18:09:40
Message-ID: 11194.1341338980@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> I wonder if we just should add a format code like %R or something similar as a
> replacement for the %X/%X notion.

Only if you can explain how to teach gcc what it means for elog argument
match checking. %m is a special case in that it matches up with a
longstanding glibc-ism that gcc knows about. Adding format codes of our
own invention would be problematic.

> Having to type something like "(uint32)
> (state->curptr >> 32), (uint32)state->curptr" everywhere is somewhat annoying.

If we really feel this is worth doing something about, we could invent a
formatting subroutine that converts XLogRecPtr to string (and then we
just use %s in the messages).

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2012-07-03 18:45:51 Re: Support for XLogRecPtr in expand_fmt_string?
Previous Message Pavel Stehule 2012-07-03 18:01:38 Re: proof concept - access to session variables on client side