Re: [PATCHES] snprintf() argument reordering not working

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgman(at)candle(dot)pha(dot)pa(dot)us, ntufar(at)gmail(dot)com, devrim(at)kivi(dot)com(dot)tr, mha(at)sollentuna(dot)net, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCHES] snprintf() argument reordering not working
Date: 2005-12-05 15:56:14
Message-ID: 29961.1133798174@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> What is more, when I set the locale of my machine to Turkish and run the
> installer project's 8.1_RC1 which I happen to have installed there, and
> set lc_messages to tr_TR.UTF-8, I don't see lines like Nicolai reported:
> LOG: "$s" veritaban?n transaction ID warp limiti $u
> I see this:
> LOG: "2147484146" veritabanin transaction ID warp limiti postgres

Well, that's pretty broken too :-(. The tr.po file entry is

msgid "transaction ID wrap limit is %u, limited by database \"%s\""
msgstr "\"%2$s\" veritabann transaction ID warp limiti %1$u"

and if I'm not completely confused, correct translated output would be

"postgres" veritabann transaction ID warp limiti 2147484146

Nicolai's report looks a bit like what you would expect from an sprintf
implementation that hadn't heard of %n$ specs at all. Your report looks
suspiciously like what our broken version of sprintf was producing last
week --- see
http://archives.postgresql.org/pgsql-hackers/2005-12/msg00194.php

How certain are you that that config setting is inhibiting use of
port/snprintf.c? It seems unlikely that any other implementation would
have duplicated our bug.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Brown 2005-12-05 16:28:43 Re: Reducing relation locking overhead
Previous Message Andrew Dunstan 2005-12-05 15:44:45 Re: [PATCHES] snprintf() argument reordering not working

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2005-12-05 16:33:16 Re: [PATCHES] snprintf() argument reordering not working
Previous Message Andrew Dunstan 2005-12-05 15:44:45 Re: [PATCHES] snprintf() argument reordering not working