Skip site navigation (1) Skip section navigation (2)

Re: libpq events patch (with sgml docs)

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Andrew Chernow <ac(at)esilo(dot)com>
Cc: "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>, Merlin Moncure <mmoncure(at)gmail(dot)com>
Subject: Re: libpq events patch (with sgml docs)
Date: 2008-09-05 19:22:15
Message-ID: 20080905192215.GK4353@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Andrew Chernow escribió:

> ! 						printfPQExpBuffer(&conn->errorMessage,
> ! 							libpq_gettext("PGEventProc \"%s\" failed during PGEVT_CONNRESET event\n"),
> ! 							conn->events[i].name);
> ! 					else
> ! 						printfPQExpBuffer(&conn->errorMessage,
> ! 							libpq_gettext("PGEventProc \"addr:%p\" failed during PGEVT_CONNRESET event\n"),
> ! 							conn->events[i].proc);
> ! 					break;

Please don't do this.  It creates extra unnecessary work for
translators.  Better create a local var, assign either "name" or
"addr:<value>" to it, and then use that in the message.

(For the record, I'd prefer that the name is made mandatory.)

Oh, BTW: don't post to pgsql-patches.  It's deprecated.  Use
pgsql-hackers instead.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

pgsql-hackers by date

Next:From: Merlin MoncureDate: 2008-09-05 19:22:16
Subject: Re: libpq events update
Previous:From: Andrew ChernowDate: 2008-09-05 19:14:59
Subject: libpq events patch (with sgml docs)

pgsql-patches by date

Next:From: Andrew ChernowDate: 2008-09-05 19:40:56
Subject: Re: [PATCHES] libpq events patch (with sgml docs)
Previous:From: Andrew ChernowDate: 2008-09-05 19:14:59
Subject: libpq events patch (with sgml docs)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group