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
ab9b6c45
Commit
ab9b6c45
authored
Aug 15, 2001
by
Tatsuo Ishii
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add conver/convert2 functions. They are similar to the SQL99's convert.
parent
872cd63d
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
221 additions
and
80 deletions
+221
-80
src/backend/utils/init/miscinit.c
src/backend/utils/init/miscinit.c
+14
-1
src/backend/utils/mb/mbutils.c
src/backend/utils/mb/mbutils.c
+193
-75
src/include/catalog/pg_proc.h
src/include/catalog/pg_proc.h
+8
-2
src/include/mb/pg_wchar.h
src/include/mb/pg_wchar.h
+3
-1
src/include/utils/builtins.h
src/include/utils/builtins.h
+3
-1
No files found.
src/backend/utils/init/miscinit.c
View file @
ab9b6c45
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.7
5 2001/08/06 18:17:42 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.7
6 2001/08/15 07:07:40 ishii
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -209,6 +209,19 @@ PG_char_to_encoding(PG_FUNCTION_ARGS)
PG_RETURN_INT32
(
0
);
}
Datum
pg_convert
(
PG_FUNCTION_ARGS
)
{
elog
(
ERROR
,
"convert is not supported. To use convert, you need to enable multibyte capability"
);
return
DirectFunctionCall1
(
textin
,
CStringGetDatum
(
""
));
}
Datum
pg_convert2
(
PG_FUNCTION_ARGS
)
{
elog
(
ERROR
,
"convert is not supported. To use convert, you need to enable multibyte capability"
);
return
DirectFunctionCall1
(
textin
,
CStringGetDatum
(
""
));
}
#endif
/* ----------------------------------------------------------------
...
...
src/backend/utils/mb/mbutils.c
View file @
ab9b6c45
This diff is collapsed.
Click to expand it.
src/include/catalog/pg_proc.h
View file @
ab9b6c45
...
...
@@ -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.20
4 2001/08/14 22:21:58 tgl
Exp $
* $Id: pg_proc.h,v 1.20
5 2001/08/15 07:07:40 ishii
Exp $
*
* NOTES
* The script catalog/genbki.sh reads this file and generates .bki
...
...
@@ -2137,7 +2137,13 @@ DESCR("return portion of string");
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"
);
DATA
(
insert
OID
=
1295
(
pg_char_to_encoding
PGUID
12
f
t
f
t
1
f
23
"19"
100
0
0
100
PG_char_to_encoding
-
));
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"
);
DATA
(
insert
OID
=
1813
(
convert
PGUID
12
f
t
f
t
3
f
25
"25 19 19"
100
0
0
100
pg_convert2
-
));
DESCR
(
"convert string with specified encoding names"
);
DATA
(
insert
OID
=
1264
(
pg_char_to_encoding
PGUID
12
f
t
f
t
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
12
f
t
f
t
1
f
19
"23"
100
0
0
100
PG_encoding_to_char
-
));
...
...
src/include/mb/pg_wchar.h
View file @
ab9b6c45
/* $Id: pg_wchar.h,v 1.2
7 2001/07/15 11:07:37
ishii Exp $ */
/* $Id: pg_wchar.h,v 1.2
8 2001/08/15 07:07:40
ishii Exp $ */
#ifndef PG_WCHAR_H
#define PG_WCHAR_H
...
...
@@ -145,6 +145,8 @@ extern unsigned char *pg_server_to_client(unsigned char *, int);
extern
int
pg_valid_client_encoding
(
const
char
*
);
extern
pg_encoding_conv_tbl
*
pg_get_enc_ent
(
int
);
extern
int
pg_utf_mblen
(
const
unsigned
char
*
);
extern
int
pg_find_encoding_converters
(
int
,
int
,
void
(
**
)(),
void
(
**
)());
extern
unsigned
char
*
pg_do_encoding_conversion
(
unsigned
char
*
,
int
,
void
(
*
)(),
void
(
*
)());
/* internally-used versions of functions. The PG_xxx forms of these
* functions have fmgr-compatible interfaves.
...
...
src/include/utils/builtins.h
View file @
ab9b6c45
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: builtins.h,v 1.16
1 2001/08/14 22:21:59 tgl
Exp $
* $Id: builtins.h,v 1.16
2 2001/08/15 07:07:40 ishii
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -581,6 +581,8 @@ extern Datum RI_FKey_setdefault_upd(PG_FUNCTION_ARGS);
extern
Datum
getdatabaseencoding
(
PG_FUNCTION_ARGS
);
extern
Datum
PG_encoding_to_char
(
PG_FUNCTION_ARGS
);
extern
Datum
PG_char_to_encoding
(
PG_FUNCTION_ARGS
);
extern
Datum
pg_convert
(
PG_FUNCTION_ARGS
);
extern
Datum
pg_convert2
(
PG_FUNCTION_ARGS
);
/* format_type.c */
extern
Datum
format_type
(
PG_FUNCTION_ARGS
);
...
...
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