Relocatable locale

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Relocatable locale
Date: 2004-05-25 00:59:28
Message-ID: 200405250059.i4P0xSB22857@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Magnus found out that LOCALEDIR wasn't being handled in a relocatable
manner.

This patch fixes that. It also adjusts the get_*_path functions to
limit values to MAXPGPATH.

I have two questions. First, setlocale() seemed to be inconsistently
set inside and outside of ENABLE_NLS. I assume the proper location is
inside. 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.

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

Attachment Content-Type Size
unknown_filename text/plain 29.1 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-05-25 01:29:30 Re: Relocatable locale
Previous Message Magnus Hagander 2004-05-24 21:57:12 Small patch for oracle_compat.c