On Mon, Sep 10, 2001 at 01:46:28PM +0900, Tatsuo Ishii wrote:
> Hi,
> 
> I'm going to add a new function "pg_client_encoding" returning the
> current client side encoding name. I know there is a similar
> functionality already there in PostgreSQL (show client_encoding) but
> it's pain to handle notice message by a program.
> 
> Also note that JDBC driver and maybe some other APIs use
> getdatabaseencoding, but I think it's not adequate for FE APIs to know
> actual encoding passed to FE side, since an encoding conversion might
> be made in BE side. For example, if PGCLIENTENCODING is set to SJIS
> before starting postmaster, the actual encoding passed to FE would be
> SJIS even the database encoding is EUC_JP.
> 
> Comments?

 What some common function like pg_show():

 SELECT pg_show('CLIENT_ENCODING');
 SELECT pg_show('SERVER_ENCODING');
 SELECT pg_show('DATESTYLE');

 that returns same result as standard 'SHOW' command, but not as NOTICE?
A lot of code for this function can be shared with current SHOW routines.
I'm sure non-libpq clients (like JDBC) maintainers will happy with it. 

        Karel

-- 
 Karel Zak  <[EMAIL PROTECTED]>
 http://home.zf.jcu.cz/~zakkr/
 
 C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to