Skip site navigation (1) Skip section navigation (2)

Re: Relocatable locale

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Relocatable locale
Date: 2004-05-25 01:59:40
Message-ID: 200405250159.i4P1xeP08496@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Tom Lane wrote:
> >> I don't really believe that path.c has any business doing this at
> >> all, in any program.
> 
> > Well, all our client apps used to do it in their own code.  Now they
> > call set_pglocale to do it centrally and relocabably.
> 
> I don't care if the clients do it.  I don't want main.c doing it.

Well, as coded now, it will behave the same.

The old code has in main.c:

-       bindtextdomain("postgres", LOCALEDIR);
-       textdomain("postgres");

and now it has a call to set_pgsetlocale which does:

    if (find_my_exec(argv0, my_exec_path) < 0)
        return;

    get_locale_path(argv0, path);
    bindtextdomain(app, path);
    textdomain(app);

-- 
  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

Responses

pgsql-patches by date

Next:From: Tom LaneDate: 2004-05-25 02:08:16
Subject: Re: Relocatable locale
Previous:From: Tom LaneDate: 2004-05-25 01:56:02
Subject: Re: Relocatable locale

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group