minor changes in psql's \encoding command

From: Weiping He <laser(at)zhengmai(dot)com(dot)cn>
To: pgsql-patches(at)postgresql(dot)org
Subject: minor changes in psql's \encoding command
Date: 2003-01-05 03:16:20
Message-ID: 3E17A384.4070008@zhengmai.com.cn
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Hi all,

While developing one of our applicatins,
we found that psql's meta command \encoding
return different result to what
"SHOW CLIENT_ENCODING" command return.
And it make us somewhat difficult to determine
our problem. After take a look at source of psql
and libpq, I found that the \encoding command
only use the encoding setting while connection was made.
don't know why, but a few changes make \encoding command
synchronized with "SHOW CLIENT_ENCODING" &
"SET CLIENT_ENCODING TO 'something'"

please apply it if it's useful.

regards laser

Attachment Content-Type Size
fe-connect.c.patch text/plain 808 bytes
command.c.patch text/plain 603 bytes
libpq-fe.h.patch text/plain 692 bytes

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2003-01-05 03:33:39 Re: minor changes in psql's \encoding command
Previous Message Peter Eisentraut 2003-01-04 23:26:47 Re: pg_dump.options.diff