-
+
Functions and Operators
trim
+ |
+ pg_client_encoding()
+ name
+
+ Returns current client encoding name.
+
+ pg_client_encoding()
+ SQL_ASCII
+
+
|
repeat(text, integer)
text
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.77 2001/09/08 15:24:00 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.78 2001/10/12 02:08:34 ishii Exp $
*
*-------------------------------------------------------------------------
*/
return DirectFunctionCall1(namein, CStringGetDatum("SQL_ASCII"));
}
+Datum
+pg_client_encoding(PG_FUNCTION_ARGS)
+{
+ return DirectFunctionCall1(namein, CStringGetDatum("SQL_ASCII"));
+}
+
Datum
PG_encoding_to_char(PG_FUNCTION_ARGS)
{
* 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"
Assert(DatabaseEncoding);
return DirectFunctionCall1(namein, CStringGetDatum(DatabaseEncoding->name));
}
+
+Datum
+pg_client_encoding(PG_FUNCTION_ARGS)
+{
+ Assert(ClientEncoding);
+ return DirectFunctionCall1(namein, CStringGetDatum(ClientEncoding->name));
+}
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_proc.h,v 1.215 2001/10/03 17:22:05 tgl Exp $
+ * $Id: pg_proc.h,v 1.216 2001/10/12 02:08:34 ishii Exp $
*
* NOTES
* The script catalog/genbki.sh reads this file and generates .bki
/* for multi-byte support */
-/* old encoding names - back compatibility only */
+/* return database encoding name */
DATA(insert OID = 1039 ( getdatabaseencoding PGUID 12 f t f t 0 f 19 "0" 100 0 0 100 getdatabaseencoding - ));
DESCR("encoding name of current database");
+/* return client encoding name i.e. session encoding */
+DATA(insert OID = 810 ( pg_client_encoding PGUID 12 f t f t 0 f 19 "0" 100 0 0 100 pg_client_encoding - ));
+DESCR("encoding name of current database");
+
DATA(insert OID = 1717 ( convert PGUID 12 f t f t 2 f 25 "25 19" 100 0 0 100 pg_convert - ));
DESCR("convert string with specified destination encoding name");