Error message translation, with variable reason text

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Error message translation, with variable reason text
Date: 2009-12-06 16:05:38
Message-ID: 1260115538.13774.45402.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


I have an ereport() in the HS patch that looks like this
ereport(trace_recovery(DEBUG1),
(errmsg("recovery cancels virtual transaction %u/%u pid %d because of
conflict with %s",
waitlist->backendId,
waitlist->localTransactionId,
pid,
reason)));

The purpose of this is to give an LOG message with a variable reason
code. Should I worry about the translatability of something that exists
for DEBUG, and if so, what is the best/approved/recommended way of
making a message both translatable and variable?

Thanks,

--
Simon Riggs www.2ndQuadrant.com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2009-12-06 16:09:18 Re: Allowing DML RULEs that produce Read Only actions during RO xacts
Previous Message Tom Lane 2009-12-06 15:58:29 Re: Allowing DML RULEs that produce Read Only actions during RO xacts