Re: [pgsql-hackers-win32] [HACKERS] snprintf causes regression tests

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Magnus Hagander <mha(at)sollentuna(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Nicolai Tufar <ntufar(at)gmail(dot)com>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [pgsql-hackers-win32] [HACKERS] snprintf causes regression tests
Date: 2005-03-02 16:17:13
Message-ID: 200503021717.14766.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Am Mittwoch, 2. März 2005 16:50 schrieb Bruce Momjian:
> Right. It is Unix that has the problem. It seems we are supplying a
> special snprintf() only so gettext() in libintl will use ours instead of
> the operating system's. Isn't there a way to target just that library
> for our replacement snprintf()? Our code itself doesn't need the
> positional parameters.

No, it's exactly our code that needs the snprintf(). libintl does not need
it.

> Could we read the snprintf translation string and process positional
> parameters _before_ we sent it to gettext()?

That would defeat the entire point of this exercise. Then translators would
have to translate each possible substitution separately and we wouldn't need
positional parameters at all.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Mark Wong 2005-03-02 17:04:38 Re: WIP: buffer manager rewrite (take 2)
Previous Message pgsql 2005-03-02 16:00:53 Re: [pgsql-hackers-win32] snprintf causes regression