Re: Proposal: Log inability to lock pages during vacuum - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Proposal: Log inability to lock pages during vacuum
Date
Msg-id 5491CB57.3000006@vmware.com
Whole thread Raw
In response to Re: Proposal: Log inability to lock pages during vacuum  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
List pgsql-hackers
On 12/17/2014 08:02 PM, Jim Nasby wrote:
> BTW, what is it about a dynamic message that makes it untranslatable?
> Doesn't the translation happen down-stream, so that at most we'd just
> need two translation messages?

I'm not sure what you mean by down-stream. There is some explanation on 
this in the localization guide in the manual:

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

printf("Files were %s.\n", flag ? "copied" : "removed");

The translator will get three strings to translate: "Files were %s.\n", 
"copied", and "removed".

> Or worst case we could have two
> separate elog calls, if we wanted to go that route.

Yeah, that's one option. I.e:

if (flag)  printf("Files were copied.\n");
else  printf("Files were removed.\n");

- Heikki




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: postgres messages error
Next
From: Alvaro Herrera
Date:
Subject: Re: Proposal: Log inability to lock pages during vacuum