Re: Proposal: Log inability to lock pages during vacuum

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: Log inability to lock pages during vacuum
Date: 2014-12-17 18:28:39
Message-ID: 5491CB57.3000006@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2014-12-17 18:39:39 Re: Proposal: Log inability to lock pages during vacuum
Previous Message Tom Lane 2014-12-17 18:18:17 Re: postgres messages error