Error message translation, with variable reason text - Mailing list pgsql-hackers

From Simon Riggs
Subject Error message translation, with variable reason text
Date
Msg-id 1260115538.13774.45402.camel@ebony
Whole thread Raw
Responses Re: Error message translation, with variable reason text  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I have an ereport() in the HS patch that looks like this                        ereport(trace_recovery(DEBUG1),
(errmsg("recoverycancels 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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Allowing DML RULEs that produce Read Only actions during RO xacts
Next
From: Simon Riggs
Date:
Subject: Re: Allowing DML RULEs that produce Read Only actions during RO xacts