Re: pgsql: Use TypeName to represent type names in certain commands - Mailing list pgsql-committers

From Alvaro Herrera
Subject Re: pgsql: Use TypeName to represent type names in certain commands
Date
Msg-id 20141230172156.GU1645@alvh.no-ip.org
Whole thread Raw
In response to Re: pgsql: Use TypeName to represent type names in certain commands  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Responses Re: pgsql: Use TypeName to represent type names in certain commands  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-committers
Heikki Linnakangas wrote:
> On 12/30/2014 06:58 PM, Alvaro Herrera wrote:
> >-                        errmsg("name list length must be %d", 1)));
> >+                        errmsg("name list length must be exactly %d", 1)));
>
> Seems silly to pass constant 1 as an argument. (Yeah, it was silly before
> this commit too.)

It seems silly, but if we had another message with a different constant,
this would make them both be a single translatable string.  I have
changed other messages in the same way, for example see the (seemingly
unrelated) change to src/backend/libpq/hba.c in 73c986adde5d73a5e2555da.

> There is one instance of the old message left in pg_get_object_address.
> Should change that too for consistency, and to reduce translation work.

Hm, I couldn't find it ... care to provide a line number?

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: pgsql: Use TypeName to represent type names in certain commands
Next
From: Alvaro Herrera
Date:
Subject: pgsql: Fix object_address expected output