Re: libpq events patch (with sgml docs) - Mailing list pgsql-patches

From Alvaro Herrera
Subject Re: libpq events patch (with sgml docs)
Date
Msg-id 20080905192215.GK4353@alvh.no-ip.org
Whole thread Raw
In response to libpq events patch (with sgml docs)  (Andrew Chernow <ac@esilo.com>)
Responses Re: libpq events patch (with sgml docs)
List pgsql-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.

pgsql-patches by date:

Previous
From: Andrew Chernow
Date:
Subject: libpq events patch (with sgml docs)
Next
From: "David Rowley"
Date:
Subject: Re: [HACKERS] TODO item: Implement Boyer-Moore searching (First time hacker)