File tree Expand file tree Collapse file tree 5 files changed +35
-9
lines changed Expand file tree Collapse file tree 5 files changed +35
-9
lines changed Original file line number Diff line number Diff line change 7
7
*
8
8
*
9
9
* IDENTIFICATION
10
- * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.39 2000/01/13 18:26:11 petere Exp $
10
+ * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.40 2000/01/18 05:10:29 ishii Exp $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -67,12 +67,24 @@ SetDatabaseName(const char *name)
67
67
68
68
#ifndef MULTIBYTE
69
69
/* even if MULTIBYTE is not enabled, this function is neccesary
70
- * since pg_proc.h has an entry for it .
70
+ * since pg_proc.h has entries for them .
71
71
*/
72
72
const char *
73
73
getdatabaseencoding ()
74
74
{
75
- elog (ERROR , "MultiByte strings (MB) must be enabled to use this function" );
75
+ elog (ERROR , "MultiByte support must be enabled to use this function" );
76
+ return ("" );
77
+ }
78
+
79
+ const char * pg_encoding_to_char (int encoding )
80
+ {
81
+ elog (ERROR , "MultiByte support must be enabled to use this function" );
82
+ return ("" );
83
+ }
84
+
85
+ int pg_char_to_encoding (const char * encoding_string )
86
+ {
87
+ elog (ERROR , "MultiByte support must be enabled to use this function" );
76
88
return ("" );
77
89
}
78
90
Original file line number Diff line number Diff line change 36
36
*
37
37
* Copyright (c) 1994, Regents of the University of California
38
38
*
39
- * $Id: catversion.h,v 1.7 2000/01/14 00:53:50 tgl Exp $
39
+ * $Id: catversion.h,v 1.8 2000/01/18 05:08:29 ishii Exp $
40
40
*
41
41
*-------------------------------------------------------------------------
42
42
*/
52
52
*/
53
53
54
54
/* yyyymmddN */
55
- #define CATALOG_VERSION_NO 200001131
55
+ #define CATALOG_VERSION_NO 200001171
56
56
57
57
#endif
Original file line number Diff line number Diff line change 6
6
*
7
7
* Copyright (c) 1994, Regents of the University of California
8
8
*
9
- * $Id: pg_proc.h,v 1.113 2000/01/17 00:40:51 tgl Exp $
9
+ * $Id: pg_proc.h,v 1.114 2000/01/18 05:08:29 ishii Exp $
10
10
*
11
11
* NOTES
12
12
* The script catalog/genbki.sh reads this file and generates .bki
@@ -2110,6 +2110,13 @@ DESCR("sequence set value");
2110
2110
2111
2111
/* for multi-byte support */
2112
2112
DATA (insert OID = 1039 ( getdatabaseencoding PGUID 11 f t f 0 f 19 "0" 100 0 0 100 getdatabaseencoding - ));
2113
+ DESCR ("encoding name of current database" );
2114
+
2115
+ DATA (insert OID = 1295 ( pg_char_to_encoding PGUID 11 f t f 1 f 23 "19" 100 0 0 100 pg_char_to_encoding - ));
2116
+ DESCR ("convert encoding name to encoding id" );
2117
+
2118
+ DATA (insert OID = 1597 ( pg_encoding_to_char PGUID 11 f t f 1 f 19 "23" 100 0 0 100 pg_encoding_to_char - ));
2119
+ DESCR ("convert encoding id to encoding name" );
2113
2120
2114
2121
/* System-view support functions */
2115
2122
DATA (insert OID = 1640 ( pg_get_ruledef PGUID 11 f t f 1 f 25 "19" 100 0 0 100 pg_get_ruledef - ));
Original file line number Diff line number Diff line change 1
- /* $Id: pg_wchar.h,v 1.12 2000/01/15 18:30:35 petere Exp $ */
1
+ /* $Id: pg_wchar.h,v 1.13 2000/01/18 05:08:31 ishii Exp $ */
2
2
3
3
#ifndef PG_WCHAR_H
4
4
#define PG_WCHAR_H
@@ -121,8 +121,13 @@ extern int pg_get_client_encoding(void);
121
121
extern unsigned char * pg_client_to_server (unsigned char * , int );
122
122
extern unsigned char * pg_server_to_client (unsigned char * , int );
123
123
extern int pg_valid_client_encoding (const char * );
124
+
125
+ /* moved to miscadmin.h
126
+ * pg_proc.h now have them.
124
127
extern const char *pg_encoding_to_char(int);
125
128
extern int pg_char_to_encoding(const char *);
129
+ */
130
+
126
131
extern int GetDatabaseEncoding (void );
127
132
extern void SetDatabaseEncoding (int );
128
133
extern void SetTemplateEncoding (int );
Original file line number Diff line number Diff line change 11
11
*
12
12
* Copyright (c) 1994, Regents of the University of California
13
13
*
14
- * $Id: miscadmin.h,v 1.47 2000/01/13 18:26:15 petere Exp $
14
+ * $Id: miscadmin.h,v 1.48 2000/01/18 05:08:29 ishii Exp $
15
15
*
16
16
* NOTES
17
17
* some of the information in this file will be moved to
@@ -119,10 +119,12 @@ extern char *ExpandDatabasePath(const char *path);
119
119
extern void SetDatabaseName (const char * name );
120
120
extern void SetDatabasePath (const char * path );
121
121
122
- /* even if MB is not enabled, this function is neccesary
122
+ /* even if MULTIBYTE is not enabled, this function is neccesary
123
123
* since pg_proc.h does have.
124
124
*/
125
125
extern const char * getdatabaseencoding (void );
126
+ extern const char * pg_encoding_to_char (int );
127
+ extern int pg_char_to_encoding (const char * );
126
128
127
129
extern char * getpgusername (void );
128
130
extern void SetPgUserName (void );
You can’t perform that action at this time.
0 commit comments