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

Re: Fix for pg_upgrade's forcing pg_controldata into English

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Greg Sabino Mullane <greg(at)turnstep(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fix for pg_upgrade's forcing pg_controldata into English
Date: 2010-09-01 22:39:39
Message-ID: 201009012239.o81MddW21742@momjian.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)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.

OK, here is a patch that sets all the variables that pg_regress.c sets.

-- 
  Bruce Momjian  <bruce(at)momjian(dot)us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

Attachment: /pgpatches/pg_upgrade
Description: text/x-diff (5.0 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-09-01 23:11:52
Subject: Re: compiling with RELCACHE_FORCE_RELEASE doesn't pass regression
Previous:From: Jeff DavisDate: 2010-09-01 22:33:17
Subject: Re: compiling with RELCACHE_FORCE_RELEASE doesn't pass regression

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