Re: encoding names

From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
Cc: peter_e(at)gmx(dot)net, pgsql-patches(at)postgresql(dot)org
Subject: Re: encoding names
Date: 2001-09-03 07:43:29
Message-ID: 20010903094329.A3122@zf.jcu.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

On Mon, Sep 03, 2001 at 10:02:44AM +0900, Tatsuo Ishii wrote:
> Thanks for the patches. I will check them as soon as possible. Also,
> I would like to ask Hiroshi and others who are working for the ODBC
> driver to check if everything is ok.

Thanks.

>
> > I found new bug in command/variable.c in parse_client_encoding(), nobody
> > probably never see this error:
> >
> > if (pg_set_client_encoding(encoding))
> > {
> > elog(ERROR, "Conversion between %s and %s is not supported",
> > value, GetDatabaseEncodingName());
> > }
> >
> > because pg_set_client_encoding() returns -1 for error and 0 as true.
> > It's fixed too.
>
> ??? In C, anthing other than 0 is evaluted to true. So the original
> code would work as expected.

Grrrr, I'm really forget my brain at home sometime.... (But with "< 0"
it's more readable, right?:-)

--
Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
http://home.zf.jcu.cz/~zakkr/

C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2001-09-03 20:29:17 Re: Patch for pl/tcl Tcl_ExternalToUtf and Tcl_UtfToExternal
Previous Message Christopher Kings-Lynne 2001-09-03 02:56:59 Re: INTERVAL type: SQL92 implementation