Thread: v7.3 : \encoding doesn't show changes in client encoding that are not done with \encoding itself (i.e. set names/set client_encoding)

L.S.

It seems that '\encoding' only shows the correct client encoding if any
changes are applied by using '\encoding' itself.

If the client encoding is changed by using 'set names' or 'set
client_encoding', the result of '\encoding' will still be the old one used.
However, the encoding seems to be changed, as 'show client_encoding' will
show.




Regards,




Frank van Vugt



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)


--ELM1041745565-23840-0_--

Re: v7.3 : \encoding doesn't show changes in client encoding

From
Bruce Momjian
Date:
Seems it is known bug.  I am documenting it with this patch.  We can't
seem to think of a clean way to fix it properly.

---------------------------------------------------------------------------

Frank van Vugt wrote:
> L.S.
>
> It seems that '\encoding' only shows the correct client encoding if any
> changes are applied by using '\encoding' itself.
>
> If the client encoding is changed by using 'set names' or 'set
> client_encoding', the result of '\encoding' will still be the old one used.
> However, the encoding seems to be changed, as 'show client_encoding' will
> show.
>
>
>
>
> Regards,
>
>
>
>
> Frank van Vugt
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: doc/src/sgml/ref/psql-ref.sgml
===================================================================
RCS file: /cvsroot/pgsql-server/doc/src/sgml/ref/psql-ref.sgml,v
retrieving revision 1.82
diff -c -c -r1.82 psql-ref.sgml
*** doc/src/sgml/ref/psql-ref.sgml    6 Jan 2003 18:53:24 -0000    1.82
--- doc/src/sgml/ref/psql-ref.sgml    7 Jan 2003 18:44:11 -0000
***************
*** 1052,1057 ****
--- 1052,1063 ----
          Sets the client encoding, if you are using multibyte encodings.
          Without an argument, this command shows the current encoding.
          </para>
+     <note>
+     <para>
+     This command does not see changes made by <command>SET
+         CLIENT_ENCODING</>.
+     </para>
+     </note>
          </listitem>
        </varlistentry>