Re: Re: [COMMITTERS] pgsql: Redefine _() to dgettext()instead of gettext() so that it uses

From: "Hiroshi Saito" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>
To: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Peter Eisentraut" <peter_e(at)gmx(dot)net>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: Redefine _() to dgettext()instead of gettext() so that it uses
Date: 2009-03-08 01:58:42
Message-ID: A0B12752778847049A8120E43610C3E7@HIRO57887DE653
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Hi Alvaro-san.

Yeah, It seems that it saves also except pl. then, It also regards me as very good.
I tested just now, of course, it is very comfortable. :-)

== try ==
C:\work>psql -e -f plpgsql_test.sql
show client_encoding;
client_encoding
-----------------
latin1
(1 row)

show server_encoding;
server_encoding
-----------------
UTF8
(1 row)

set lc_messages to es;
SET
show lc_messages;
lc_messages
-------------
es
(1 row)

create function func1() returns int as '
begin
select "a;
end;
' language 'plpgsql';
psql:plpgsql_test.sql:10: ERROR: un identificador entre comillas está inconcluso
CONTEXT: compilation of PL/pgSQL function "func1" near line 2

==/END

Thanks!

Regards,
Hiroshi Saito

----- Original Message -----
From: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>

> Tom Lane wrote:
>> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
>> > Understood. In fact, after having a look at this patch and giving it a
>> > little refactoring I think it's pretty obvious; right now we're calling
>> > bind_textdomain_codeset only for the main domain, and with this patch we
>> > also set it for all other domains we use.
>
>> More generally, should we push the bindtextdomain calls themselves into
>> the new function (and perhaps call it something else than
>> SetDomainCodeSet)? Seems like logically this should be thought of as
>> all one operation, ie, it's not clear to me that it ever makes sense to
>> call bindtextdomain without also worrying about encoding.
>
> I'm not sure that can be made to work easily. On the backend itself we
> call bindtextdomain in set_pglocale_pgservice() which is also used by
> programs in src/bin/. Shuffling things in there would be more involved
> than seems worth.
>
> As for names, how about pg_bind_textdomain_codeset?
>
> --
> Alvaro Herrera http://www.CommandPrompt.com/
> The PostgreSQL Company - Command Prompt, Inc.
>

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message User Jbcooley 2009-03-08 03:24:24 npgsql - Npgsql2: Updated scan to handle Table attribute for cases where
Previous Message Alvaro Herrera 2009-03-07 23:53:39 Re: Re: [COMMITTERS] pgsql: Redefine _() to dgettext() instead of gettext() so that it uses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-03-08 02:10:46 status of remaining patches
Previous Message Robert Haas 2009-03-08 01:42:07 Re: Out parameters handling