Gregory Stark <st...@enterprisedb.com> writes:
> Tom Lane <t...@sss.pgh.pa.us> writes:
>> The really nasty cases are like this:
>> const char *myfmt = gettext_noop("Some bleat about object \"%s\".");
>> ...
>> errmsg(myfmt, objectname)

> It makes sense to me: if you have arguments for the format string then
> presumably you've at some point had to check that the format string has
> escapes for those arguments.

Actually, there was just an issue in the open patch for column
privileges where Stephen had added a format string that failed to match
the arguments that would be supplied.  What'd be really useful is some
way to tie the constants themselves to the errmsg call for error
checking purposes ... can't see a decent way to do it though.

BTW, does the gettext infrastructure make any checks to ensure that
translators didn't bollix the format codes?  It seems like that should
be doable with just a SMOP, but I don't know if it's in there or not.

                        regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to