Re: Add PG version number to NLS files

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Martin Pitt <mpitt(at)debian(dot)org>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Add PG version number to NLS files
Date: 2005-06-25 20:30:38
Message-ID: 200506252030.j5PKUcN07481@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Martin Pitt wrote:
> Hi!
>
> Peter Eisentraut [2005-06-25 11:29 +0200]:
> > Am Samstag, 25. Juni 2005 04:24 schrieb Bruce Momjian:
> > > We absolutely want to support multiple installed versions of PostgreSQL.
> >
> > But we don't support installing multiple versions on top of each other, which
> > is the only scenario where this patch would be useful.
>
> It's not "on top of each other", but side-by-side as Bruce says. The
> single clusters and their postmaster do not influence each other in
> Debian.

I have looked now at the bindtextdomain() code in current CVS and 8.0.X.

We basically have only two bindtextdomain() calls. libpq has this code:

bindtextdomain("libpq", getenv("PGLOCALEDIR") ? getenv("PGLOCALEDIR") : LOCALEDIR);

It basically uses either the environment variable PGLOCALEDIR, or the
hard-coded compile-time LOCALEDIR value. I don't see how adding a
version number to the "libpq" string would help unles PGLOCALEDIR points
to a directory that has both libpq-7.4 and libpq-8.0 directories with
translations, and I didn't see your setup using that.

Our applications call set_pglocale_pgservice(), which makes two
bindtextdomain() calls. It calls set_pglocale_pgservice(), like this:

set_pglocale_pgservice(argv[0], "psql");

The locale files for the application are found relative to the directory
containing the binary. It also sets the environment variable
PGLOCALEDIR so libpq can find its local files.

Based on this analsys, I don't understand what adding the PostgreSQL
version number does for us.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2005-06-25 20:42:36 Re: autovacuum bootstrap
Previous Message Tom Lane 2005-06-25 19:52:08 Re: autovacuum bootstrap

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2005-06-25 20:46:43 Re: COPY FROM performance improvements
Previous Message Andrew Dunstan 2005-06-25 20:27:04 Re: COPY FROM performance improvements