Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
5eb1d0de
Commit
5eb1d0de
authored
Jan 18, 2000
by
Tatsuo Ishii
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add builtin functions:
pg_char_to_encoding() pg_encoding_to_char()
parent
d58fa761
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
9 deletions
+35
-9
src/backend/utils/init/miscinit.c
src/backend/utils/init/miscinit.c
+15
-3
src/include/catalog/catversion.h
src/include/catalog/catversion.h
+2
-2
src/include/catalog/pg_proc.h
src/include/catalog/pg_proc.h
+8
-1
src/include/mb/pg_wchar.h
src/include/mb/pg_wchar.h
+6
-1
src/include/miscadmin.h
src/include/miscadmin.h
+4
-2
No files found.
src/backend/utils/init/miscinit.c
View file @
5eb1d0de
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.
39 2000/01/13 18:26:11 petere
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.
40 2000/01/18 05:10:29 ishii
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -67,12 +67,24 @@ SetDatabaseName(const char *name)
...
@@ -67,12 +67,24 @@ SetDatabaseName(const char *name)
#ifndef MULTIBYTE
#ifndef MULTIBYTE
/* even if MULTIBYTE is not enabled, this function is neccesary
/* even if MULTIBYTE is not enabled, this function is neccesary
* since pg_proc.h has
an entry for it
.
* since pg_proc.h has
entries for them
.
*/
*/
const
char
*
const
char
*
getdatabaseencoding
()
getdatabaseencoding
()
{
{
elog
(
ERROR
,
"MultiByte strings (MB) must be enabled to use this function"
);
elog
(
ERROR
,
"MultiByte support must be enabled to use this function"
);
return
(
""
);
}
const
char
*
pg_encoding_to_char
(
int
encoding
)
{
elog
(
ERROR
,
"MultiByte support must be enabled to use this function"
);
return
(
""
);
}
int
pg_char_to_encoding
(
const
char
*
encoding_string
)
{
elog
(
ERROR
,
"MultiByte support must be enabled to use this function"
);
return
(
""
);
return
(
""
);
}
}
...
...
src/include/catalog/catversion.h
View file @
5eb1d0de
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: catversion.h,v 1.
7 2000/01/14 00:53:50 tgl
Exp $
* $Id: catversion.h,v 1.
8 2000/01/18 05:08:29 ishii
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -52,6 +52,6 @@
...
@@ -52,6 +52,6 @@
*/
*/
/* yyyymmddN */
/* yyyymmddN */
#define CATALOG_VERSION_NO 2000011
3
1
#define CATALOG_VERSION_NO 2000011
7
1
#endif
#endif
src/include/catalog/pg_proc.h
View file @
5eb1d0de
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: pg_proc.h,v 1.11
3 2000/01/17 00:40:51 tgl
Exp $
* $Id: pg_proc.h,v 1.11
4 2000/01/18 05:08:29 ishii
Exp $
*
*
* NOTES
* NOTES
* The script catalog/genbki.sh reads this file and generates .bki
* The script catalog/genbki.sh reads this file and generates .bki
...
@@ -2110,6 +2110,13 @@ DESCR("sequence set value");
...
@@ -2110,6 +2110,13 @@ DESCR("sequence set value");
/* for multi-byte support */
/* for multi-byte support */
DATA
(
insert
OID
=
1039
(
getdatabaseencoding
PGUID
11
f
t
f
0
f
19
"0"
100
0
0
100
getdatabaseencoding
-
));
DATA
(
insert
OID
=
1039
(
getdatabaseencoding
PGUID
11
f
t
f
0
f
19
"0"
100
0
0
100
getdatabaseencoding
-
));
DESCR
(
"encoding name of current database"
);
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
-
));
DESCR
(
"convert encoding name to encoding id"
);
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
-
));
DESCR
(
"convert encoding id to encoding name"
);
/* System-view support functions */
/* System-view support functions */
DATA
(
insert
OID
=
1640
(
pg_get_ruledef
PGUID
11
f
t
f
1
f
25
"19"
100
0
0
100
pg_get_ruledef
-
));
DATA
(
insert
OID
=
1640
(
pg_get_ruledef
PGUID
11
f
t
f
1
f
25
"19"
100
0
0
100
pg_get_ruledef
-
));
...
...
src/include/mb/pg_wchar.h
View file @
5eb1d0de
/* $Id: pg_wchar.h,v 1.1
2 2000/01/15 18:30:35 petere
Exp $ */
/* $Id: pg_wchar.h,v 1.1
3 2000/01/18 05:08:31 ishii
Exp $ */
#ifndef PG_WCHAR_H
#ifndef PG_WCHAR_H
#define PG_WCHAR_H
#define PG_WCHAR_H
...
@@ -121,8 +121,13 @@ extern int pg_get_client_encoding(void);
...
@@ -121,8 +121,13 @@ extern int pg_get_client_encoding(void);
extern
unsigned
char
*
pg_client_to_server
(
unsigned
char
*
,
int
);
extern
unsigned
char
*
pg_client_to_server
(
unsigned
char
*
,
int
);
extern
unsigned
char
*
pg_server_to_client
(
unsigned
char
*
,
int
);
extern
unsigned
char
*
pg_server_to_client
(
unsigned
char
*
,
int
);
extern
int
pg_valid_client_encoding
(
const
char
*
);
extern
int
pg_valid_client_encoding
(
const
char
*
);
/* moved to miscadmin.h
* pg_proc.h now have them.
extern const char *pg_encoding_to_char(int);
extern const char *pg_encoding_to_char(int);
extern int pg_char_to_encoding(const char *);
extern int pg_char_to_encoding(const char *);
*/
extern
int
GetDatabaseEncoding
(
void
);
extern
int
GetDatabaseEncoding
(
void
);
extern
void
SetDatabaseEncoding
(
int
);
extern
void
SetDatabaseEncoding
(
int
);
extern
void
SetTemplateEncoding
(
int
);
extern
void
SetTemplateEncoding
(
int
);
...
...
src/include/miscadmin.h
View file @
5eb1d0de
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: miscadmin.h,v 1.4
7 2000/01/13 18:26:15 petere
Exp $
* $Id: miscadmin.h,v 1.4
8 2000/01/18 05:08:29 ishii
Exp $
*
*
* NOTES
* NOTES
* some of the information in this file will be moved to
* some of the information in this file will be moved to
...
@@ -119,10 +119,12 @@ extern char *ExpandDatabasePath(const char *path);
...
@@ -119,10 +119,12 @@ extern char *ExpandDatabasePath(const char *path);
extern
void
SetDatabaseName
(
const
char
*
name
);
extern
void
SetDatabaseName
(
const
char
*
name
);
extern
void
SetDatabasePath
(
const
char
*
path
);
extern
void
SetDatabasePath
(
const
char
*
path
);
/* even if M
B
is not enabled, this function is neccesary
/* even if M
ULTIBYTE
is not enabled, this function is neccesary
* since pg_proc.h does have.
* since pg_proc.h does have.
*/
*/
extern
const
char
*
getdatabaseencoding
(
void
);
extern
const
char
*
getdatabaseencoding
(
void
);
extern
const
char
*
pg_encoding_to_char
(
int
);
extern
int
pg_char_to_encoding
(
const
char
*
);
extern
char
*
getpgusername
(
void
);
extern
char
*
getpgusername
(
void
);
extern
void
SetPgUserName
(
void
);
extern
void
SetPgUserName
(
void
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment