mirror of
https://github.com/postgres/postgres.git
synced 2025-07-15 19:21:59 +03:00
Add a new function "pg_client_encoding" which returns the current client
side encoding name. This is necessary for client API's such as JDBC to perform correct encoding conversions. See my email "[HACKERS] pg_client_encoding" 10 Sep 2001.
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
* client encoding and server internal encoding.
|
||||
* (currently mule internal code (mic) is used)
|
||||
* Tatsuo Ishii
|
||||
* $Id: mbutils.c,v 1.23 2001/09/21 15:27:38 tgl Exp $
|
||||
* $Id: mbutils.c,v 1.24 2001/10/12 02:08:34 ishii Exp $
|
||||
*/
|
||||
#include "postgres.h"
|
||||
|
||||
@ -471,3 +471,10 @@ getdatabaseencoding(PG_FUNCTION_ARGS)
|
||||
Assert(DatabaseEncoding);
|
||||
return DirectFunctionCall1(namein, CStringGetDatum(DatabaseEncoding->name));
|
||||
}
|
||||
|
||||
Datum
|
||||
pg_client_encoding(PG_FUNCTION_ARGS)
|
||||
{
|
||||
Assert(ClientEncoding);
|
||||
return DirectFunctionCall1(namein, CStringGetDatum(ClientEncoding->name));
|
||||
}
|
||||
|
Reference in New Issue
Block a user