|From:||Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>|
|To:||Peter Eisentraut <peter_e(at)gmx(dot)net>|
|Subject:||Re: Relocatable locale|
|Views:||Raw Message | Whole Thread | Download mbox|
Peter Eisentraut wrote:
> Bruce Momjian wrote:
> > I have two questions. First, setlocale() seemed to be inconsistently
> > set inside and outside of ENABLE_NLS. I assume the proper location
> > is inside.
> No, in case of doubt it's outside.
OK, moved. New code is:
set_pglocale(const char *argv0, const char *app)
/* don't set LC_ALL in the backend */
if (strcmp(app, "postgres") != 0)
if (find_my_exec(argv0, my_exec_path) < 0)
> > Second, libpq has a locale setting for error messages,
> > but a libpq program could be in any directory, so I see no way to
> > make that relocatable. Instead, I just use the hardcoded path. I
> > could make it relocatable, but that seems to error-prone, plus I
> > would have to look up the exec path and stuff, and it seemed too
> > complicated.
> Hmm, so this says that a relocatable install isn't in fact possible?
Yep. I don't see how you can have a library know where to look for its
localized messages. The only thing I can think of is an environment
variable to override the hard-coded default. How is that?
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
|Next Message||Andrew Dunstan||2004-05-26 19:48:19||Re: Relocatable locale|
|Previous Message||Bruce Momjian||2004-05-26 18:50:28||Re: Cancel/Kill backend functions|