From 687084333977dfc4318c470b405c55babd056710 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 3 Jun 2004 00:07:38 +0000 Subject: Add PGETC (for pg_service.conf) and PGLOCALE (for locale dir) environment variable processing to libpq. The patch also adds code to our client apps so we set the environment variable directly based on our binary location, unless it is already set. This will allow our applications to emit proper locale messages that are generated in libpq. --- src/interfaces/libpq/fe-misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/interfaces/libpq/fe-misc.c') diff --git a/src/interfaces/libpq/fe-misc.c b/src/interfaces/libpq/fe-misc.c index abf2111a508..1d1a2795601 100644 --- a/src/interfaces/libpq/fe-misc.c +++ b/src/interfaces/libpq/fe-misc.c @@ -23,7 +23,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/interfaces/libpq/fe-misc.c,v 1.106 2004/05/25 01:00:29 momjian Exp $ + * $PostgreSQL: pgsql/src/interfaces/libpq/fe-misc.c,v 1.107 2004/06/03 00:07:38 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -1132,7 +1132,7 @@ libpq_gettext(const char *msgid) { already_bound = 1; /* No relocatable lookup here because the binary could be anywhere */ - bindtextdomain("libpq", LOCALEDIR); + bindtextdomain("libpq", getenv("PGLOCALE") ? getenv("PGLOCALE") : LOCALEDIR); } return dgettext("libpq", msgid); -- cgit v1.2.3