summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTatsuo Ishii2001-10-12 02:08:34 +0000
committerTatsuo Ishii2001-10-12 02:08:34 +0000
commitf426465ba911051fa9fce57c7c4b49350e9dbbd3 (patch)
tree29eabd6b837d08d0eb67ca81fd41b26df7b16b7e /src/include
parent9d13fcf0af024b0ce9bc344a758c6b4072e50e95 (diff)
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.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/catalog/pg_proc.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index 92a675174d..7f179d9630 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -7,7 +7,7 @@
* 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
@@ -2140,10 +2140,14 @@ DESCR("return portion of string");
/* 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");