Re: pgsql: pg_upgrade: simplify code layout in a few places

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgsql: pg_upgrade: simplify code layout in a few places
Date: 2018-01-05 19:37:58
Message-ID: CA+Tgmob6cZznp7zsA=i8ByaBM3wRe1BMyi1GNs8Or1iZ5AdXKg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Fri, Jan 5, 2018 at 2:32 PM, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> Bruce Momjian wrote:
>> On Fri, Jan 5, 2018 at 02:20:59PM -0500, Robert Haas wrote:
>> > On Fri, Jan 5, 2018 at 2:11 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>> > > pg_upgrade: simplify code layout in a few places
>> > >
>> > > Backpatch-through: 9.4 (9.3 didn't need improving)
>> >
>> > Hmm. We don't normally do things like this, because it breaks translatability.
>>
>> Oh, you mean the 'if()' statement? If so, I will revert that and add a
>> comment so I don't do it again in that place.
>
> See 837255cc81fb59b12f5a70ac2a8a9850bccf13e0. I don't think adding
> comments to every single place where this could be done (which is many
> places, not just in pg_upgrade) is a good idea.

It's also documented, of course.

https://www.postgresql.org/docs/devel/static/nls-programmer.html#NLS-GUIDELINES

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2018-01-05 19:46:36 pgsql: pg_upgrade: revert part of patch for ease of translation
Previous Message Alvaro Herrera 2018-01-05 19:32:12 Re: pgsql: pg_upgrade: simplify code layout in a few places

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-01-05 19:38:37 Re: Condition variable live lock
Previous Message Alvaro Herrera 2018-01-05 19:32:12 Re: pgsql: pg_upgrade: simplify code layout in a few places