Re: Fix for pg_upgrade's forcing pg_controldata into English - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fix for pg_upgrade's forcing pg_controldata into English
Date
Msg-id 818.1283374266@sss.pgh.pa.us
Whole thread Raw
In response to Re: Fix for pg_upgrade's forcing pg_controldata into English  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: Fix for pg_upgrade's forcing pg_controldata into English
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Excerpts from Bruce Momjian's message of mié sep 01 16:35:18 -0400 2010:
>> I have implemented your suggestion of setting LANG, LANGUAGE, and
>> LC_MESSAGES based on code in pg_regress.c;  that is the only place I see
>> where we force English, and it certainly has received more testing.

> I think a real long-term solution is to have a machine-readable format
> for pg_controldata, perhaps something very simple like

> $ pg_controldata --machine
> PGCONTROL_VERSION_NUMBER=903
> CATALOG_VERSION_NUMBER=201008051
> DATABASE_SYSIDENTIFIER=5504177303240039672
> etc

> This wouldn't be subject to translation and thus much easier to process.

+1.  pg_controldata was never written with the idea that its output
would be read by programs.  If we're going to start doing that, we
should provide an output format that's suitable, not try to work around
it in the callers.

However, that's something for 9.1 and beyond.  Bruce's immediate problem
is what to do in pg_upgrade in 9.0, and there I concur that he should
duplicate what pg_regress is doing.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Fix for pg_upgrade's forcing pg_controldata into English
Next
From: Jeff Davis
Date:
Subject: Re: compiling with RELCACHE_FORCE_RELEASE doesn't pass regression