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
8c3ab663
Commit
8c3ab663
authored
Sep 24, 2002
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweak conversion names to follow the established naming scheme, and
document that scheme.
parent
87eb561c
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
164 additions
and
151 deletions
+164
-151
doc/src/sgml/func.sgml
doc/src/sgml/func.sgml
+61
-48
src/backend/utils/mb/conversion_procs/Makefile
src/backend/utils/mb/conversion_procs/Makefile
+35
-35
src/test/regress/expected/conversion.out
src/test/regress/expected/conversion.out
+34
-34
src/test/regress/sql/conversion.sql
src/test/regress/sql/conversion.sql
+34
-34
No files found.
doc/src/sgml/func.sgml
View file @
8c3ab663
This diff is collapsed.
Click to expand it.
src/backend/utils/mb/conversion_procs/Makefile
View file @
8c3ab663
...
...
@@ -4,7 +4,7 @@
# Makefile for utils/mb/conversion_procs
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/Makefile,v 1.
6 2002/09/04 15:45:50 tgl
Exp $
# $Header: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/Makefile,v 1.
7 2002/09/24 20:14:58 petere
Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -30,26 +30,26 @@ DIRS = \
CONVERSIONS
=
\
ascii_to_mic SQL_ASCII MULE_INTERNAL ascii_to_mic ascii_and_mic
\
mic_to_ascii MULE_INTERNAL SQL_ASCII mic_to_ascii ascii_and_mic
\
koi8r_to_mic KOI8R MULE_INTERNAL koi8r_to_mic cyrillic_and_mic
\
mic_to_koi8r MULE_INTERNAL KOI8R mic_to_koi8r cyrillic_and_mic
\
koi8
_
r_to_mic KOI8R MULE_INTERNAL koi8r_to_mic cyrillic_and_mic
\
mic_to_koi8
_
r MULE_INTERNAL KOI8R mic_to_koi8r cyrillic_and_mic
\
iso_8859_5_to_mic ISO-8859-5 MULE_INTERNAL iso_to_mic cyrillic_and_mic
\
mic_to_iso_8859_5 MULE_INTERNAL ISO-8859-5 mic_to_iso cyrillic_and_mic
\
win1251_to_mic WIN1251 MULE_INTERNAL win1251_to_mic cyrillic_and_mic
\
mic_to_win1251 MULE_INTERNAL WIN1251 mic_to_win1251 cyrillic_and_mic
\
win866_to_mic ALT MULE_INTERNAL alt_to_mic cyrillic_and_mic
\
mic_to_win866 MULE_INTERNAL ALT mic_to_alt cyrillic_and_mic
\
koi8
r_to_win
1251 KOI8R WIN1251 koi8r_to_win1251 cyrillic_and_mic
\
win
1251_to_koi8
r WIN1251 KOI8R win1251_to_koi8r cyrillic_and_mic
\
koi8
r_to_win
866 KOI8R ALT koi8r_to_alt cyrillic_and_mic
\
win
866_to_koi8
r ALT KOI8R alt_to_koi8r cyrillic_and_mic
\
win
866_to_win
1251 ALT WIN1251 alt_to_win1251 cyrillic_and_mic
\
win
1251_to_win
866 WIN1251 ALT win1251_to_alt cyrillic_and_mic
\
iso_8859_5_to_koi8r ISO-8859-5 KOI8R iso_to_koi8r cyrillic_and_mic
\
koi8r_to_iso_8859_5 KOI8R ISO-8859-5 koi8r_to_iso cyrillic_and_mic
\
iso_8859_5_to_win1251 ISO-8859-5 WIN1251 iso_to_win1251 cyrillic_and_mic
\
win1251_to_iso_8859_5 WIN1251 ISO-8859-5 win1251_to_iso cyrillic_and_mic
\
iso_8859_5_to_win866 ISO-8859-5 ALT iso_to_alt cyrillic_and_mic
\
win866_to_iso_8859_5 ALT ISO-8859-5 alt_to_iso cyrillic_and_mic
\
win
dows_
1251_to_mic WIN1251 MULE_INTERNAL win1251_to_mic cyrillic_and_mic
\
mic_to_win
dows_
1251 MULE_INTERNAL WIN1251 mic_to_win1251 cyrillic_and_mic
\
win
dows_
866_to_mic ALT MULE_INTERNAL alt_to_mic cyrillic_and_mic
\
mic_to_win
dows_
866 MULE_INTERNAL ALT mic_to_alt cyrillic_and_mic
\
koi8
_r_to_windows_
1251 KOI8R WIN1251 koi8r_to_win1251 cyrillic_and_mic
\
win
dows_1251_to_koi8_
r WIN1251 KOI8R win1251_to_koi8r cyrillic_and_mic
\
koi8
_r_to_windows_
866 KOI8R ALT koi8r_to_alt cyrillic_and_mic
\
win
dows_866_to_koi8_
r ALT KOI8R alt_to_koi8r cyrillic_and_mic
\
win
dows_866_to_windows_
1251 ALT WIN1251 alt_to_win1251 cyrillic_and_mic
\
win
dows_1251_to_windows_
866 WIN1251 ALT win1251_to_alt cyrillic_and_mic
\
iso_8859_5_to_koi8
_
r ISO-8859-5 KOI8R iso_to_koi8r cyrillic_and_mic
\
koi8
_
r_to_iso_8859_5 KOI8R ISO-8859-5 koi8r_to_iso cyrillic_and_mic
\
iso_8859_5_to_win
dows_
1251 ISO-8859-5 WIN1251 iso_to_win1251 cyrillic_and_mic
\
win
dows_
1251_to_iso_8859_5 WIN1251 ISO-8859-5 win1251_to_iso cyrillic_and_mic
\
iso_8859_5_to_win
dows_
866 ISO-8859-5 ALT iso_to_alt cyrillic_and_mic
\
win
dows_
866_to_iso_8859_5 ALT ISO-8859-5 alt_to_iso cyrillic_and_mic
\
euc_cn_to_mic EUC_CN MULE_INTERNAL euc_cn_to_mic euc_cn_and_mic
\
mic_to_euc_cn MULE_INTERNAL EUC_CN mic_to_euc_cn euc_cn_and_mic
\
euc_jp_to_sjis EUC_JP SJIS euc_jp_to_sjis euc_jp_and_sjis
\
...
...
@@ -68,10 +68,10 @@ CONVERSIONS = \
mic_to_big5 MULE_INTERNAL BIG5 mic_to_big5 euc_tw_and_big5
\
iso_8859_2_to_mic LATIN2 MULE_INTERNAL latin2_to_mic latin2_and_win1250
\
mic_to_iso_8859_2 MULE_INTERNAL LATIN2 mic_to_latin2 latin2_and_win1250
\
win1250_to_mic WIN1250 MULE_INTERNAL win1250_to_mic latin2_and_win1250
\
mic_to_win1250 MULE_INTERNAL WIN1250 mic_to_win1250 latin2_and_win1250
\
iso_8859_2_to_win1250 LATIN2 WIN1250 latin2_to_win1250 latin2_and_win1250
\
win1250_to_iso_8859_2 WIN1250 LATIN2 win1250_to_latin2 latin2_and_win1250
\
win
dows_
1250_to_mic WIN1250 MULE_INTERNAL win1250_to_mic latin2_and_win1250
\
mic_to_win
dows_
1250 MULE_INTERNAL WIN1250 mic_to_win1250 latin2_and_win1250
\
iso_8859_2_to_win
dows_
1250 LATIN2 WIN1250 latin2_to_win1250 latin2_and_win1250
\
win
dows_
1250_to_iso_8859_2 WIN1250 LATIN2 win1250_to_latin2 latin2_and_win1250
\
iso_8859_1_to_mic LATIN1 MULE_INTERNAL latin1_to_mic latin_and_mic
\
mic_to_iso_8859_1 MULE_INTERNAL LATIN1 mic_to_latin1 latin_and_mic
\
iso_8859_3_to_mic LATIN3 MULE_INTERNAL latin3_to_mic latin_and_mic
\
...
...
@@ -82,12 +82,12 @@ CONVERSIONS = \
utf_8_to_ascii UNICODE SQL_ASCII utf8_to_ascii utf8_and_ascii
\
big5_to_utf_8 BIG5 UNICODE big5_to_utf8 utf8_and_big5
\
utf_8_to_big5 UNICODE BIG5 utf8_to_big5 utf8_and_big5
\
utf_8_to_koi8r UNICODE KOI8R utf8_to_koi8r utf8_and_cyrillic
\
koi8r_to_utf_8 KOI8R UNICODE koi8r_to_utf8 utf8_and_cyrillic
\
utf_8_to_win1251 UNICODE WIN1251 utf8_to_win1251 utf8_and_cyrillic
\
win1251_to_utf_8 WIN1251 UNICODE win1251_to_utf8 utf8_and_cyrillic
\
utf_8_to_win866 UNICODE ALT utf8_to_alt utf8_and_cyrillic
\
win866_to_utf_8 ALT UNICODE alt_to_utf8 utf8_and_cyrillic
\
utf_8_to_koi8
_
r UNICODE KOI8R utf8_to_koi8r utf8_and_cyrillic
\
koi8
_
r_to_utf_8 KOI8R UNICODE koi8r_to_utf8 utf8_and_cyrillic
\
utf_8_to_win
dows_
1251 UNICODE WIN1251 utf8_to_win1251 utf8_and_cyrillic
\
win
dows_
1251_to_utf_8 WIN1251 UNICODE win1251_to_utf8 utf8_and_cyrillic
\
utf_8_to_win
dows_
866 UNICODE ALT utf8_to_alt utf8_and_cyrillic
\
win
dows_
866_to_utf_8 ALT UNICODE alt_to_utf8 utf8_and_cyrillic
\
euc_cn_to_utf_8 EUC_CN UNICODE euc_cn_to_utf8 utf8_and_euc_cn
\
utf_8_to_euc_cn UNICODE EUC_CN utf8_to_euc_cn utf8_and_euc_cn
\
euc_jp_to_utf_8 EUC_JP UNICODE euc_jp_to_utf8 utf8_and_euc_jp
\
...
...
@@ -136,12 +136,12 @@ CONVERSIONS = \
utf_8_to_tcvn UNICODE TCVN utf8_to_tcvn utf8_and_tcvn
\
uhc_to_utf_8 UHC UNICODE uhc_to_utf8 utf8_and_uhc
\
utf_8_to_uhc UNICODE UHC utf8_to_uhc utf8_and_uhc
\
utf_8_to_win1250 UNICODE WIN1250 utf_to_win1250 utf8_and_win1250
\
win1250_to_utf_8 WIN1250 UNICODE win1250_to_utf utf8_and_win1250
\
utf_8_to_win1256 UNICODE WIN1256 utf_to_win1256 utf8_and_win1256
\
win1256_to_utf_8 WIN1256 UNICODE win1256_to_utf utf8_and_win1256
\
utf_8_to_win874 UNICODE WIN874 utf_to_win874 utf8_and_win874
\
win874_to_utf_8 WIN874 UNICODE win874_to_utf utf8_and_win874
utf_8_to_win
dows_
1250 UNICODE WIN1250 utf_to_win1250 utf8_and_win1250
\
win
dows_
1250_to_utf_8 WIN1250 UNICODE win1250_to_utf utf8_and_win1250
\
utf_8_to_win
dows_
1256 UNICODE WIN1256 utf_to_win1256 utf8_and_win1256
\
win
dows_
1256_to_utf_8 WIN1256 UNICODE win1256_to_utf utf8_and_win1256
\
utf_8_to_win
dows_
874 UNICODE WIN874 utf_to_win874 utf8_and_win874
\
win
dows_
874_to_utf_8 WIN874 UNICODE win874_to_utf utf8_and_win874
all
:
$(SQLSCRIPT)
@
for
dir
in
$(DIRS)
;
do
$(MAKE)
-C
$$
dir
$@
||
exit
;
done
...
...
src/test/regress/expected/conversion.out
View file @
8c3ab663
...
...
@@ -52,7 +52,7 @@ SELECT CONVERT('foo', 'MULE_INTERNAL', 'SQL_ASCII');
(1 row)
-- KOI8R --> MULE_INTERNAL
SELECT CONVERT('foo' USING koi8r_to_mic);
SELECT CONVERT('foo' USING koi8
_
r_to_mic);
convert
---------
foo
...
...
@@ -65,7 +65,7 @@ SELECT CONVERT('foo', 'KOI8R', 'MULE_INTERNAL');
(1 row)
-- MULE_INTERNAL --> KOI8R
SELECT CONVERT('foo' USING mic_to_koi8r);
SELECT CONVERT('foo' USING mic_to_koi8
_
r);
convert
---------
foo
...
...
@@ -104,7 +104,7 @@ SELECT CONVERT('foo', 'MULE_INTERNAL', 'ISO-8859-5');
(1 row)
-- WIN1251 --> MULE_INTERNAL
SELECT CONVERT('foo' USING win1251_to_mic);
SELECT CONVERT('foo' USING win
dows_
1251_to_mic);
convert
---------
foo
...
...
@@ -117,7 +117,7 @@ SELECT CONVERT('foo', 'WIN1251', 'MULE_INTERNAL');
(1 row)
-- MULE_INTERNAL --> WIN1251
SELECT CONVERT('foo' USING mic_to_win1251);
SELECT CONVERT('foo' USING mic_to_win
dows_
1251);
convert
---------
foo
...
...
@@ -130,7 +130,7 @@ SELECT CONVERT('foo', 'MULE_INTERNAL', 'WIN1251');
(1 row)
-- ALT --> MULE_INTERNAL
SELECT CONVERT('foo' USING win866_to_mic);
SELECT CONVERT('foo' USING win
dows_
866_to_mic);
convert
---------
foo
...
...
@@ -143,7 +143,7 @@ SELECT CONVERT('foo', 'ALT', 'MULE_INTERNAL');
(1 row)
-- MULE_INTERNAL --> ALT
SELECT CONVERT('foo' USING mic_to_win866);
SELECT CONVERT('foo' USING mic_to_win
dows_
866);
convert
---------
foo
...
...
@@ -156,7 +156,7 @@ SELECT CONVERT('foo', 'MULE_INTERNAL', 'ALT');
(1 row)
-- KOI8R --> WIN1251
SELECT CONVERT('foo' USING koi8
r_to_win
1251);
SELECT CONVERT('foo' USING koi8
_r_to_windows_
1251);
convert
---------
foo
...
...
@@ -169,7 +169,7 @@ SELECT CONVERT('foo', 'KOI8R', 'WIN1251');
(1 row)
-- WIN1251 --> KOI8R
SELECT CONVERT('foo' USING win
1251_to_koi8
r);
SELECT CONVERT('foo' USING win
dows_1251_to_koi8_
r);
convert
---------
foo
...
...
@@ -182,7 +182,7 @@ SELECT CONVERT('foo', 'WIN1251', 'KOI8R');
(1 row)
-- KOI8R --> ALT
SELECT CONVERT('foo' USING koi8
r_to_win
866);
SELECT CONVERT('foo' USING koi8
_r_to_windows_
866);
convert
---------
foo
...
...
@@ -195,7 +195,7 @@ SELECT CONVERT('foo', 'KOI8R', 'ALT');
(1 row)
-- ALT --> KOI8R
SELECT CONVERT('foo' USING win
866_to_koi8
r);
SELECT CONVERT('foo' USING win
dows_866_to_koi8_
r);
convert
---------
foo
...
...
@@ -208,7 +208,7 @@ SELECT CONVERT('foo', 'ALT', 'KOI8R');
(1 row)
-- ALT --> WIN1251
SELECT CONVERT('foo' USING win
866_to_win
1251);
SELECT CONVERT('foo' USING win
dows_866_to_windows_
1251);
convert
---------
foo
...
...
@@ -221,7 +221,7 @@ SELECT CONVERT('foo', 'ALT', 'WIN1251');
(1 row)
-- WIN1251 --> ALT
SELECT CONVERT('foo' USING win
1251_to_win
866);
SELECT CONVERT('foo' USING win
dows_1251_to_windows_
866);
convert
---------
foo
...
...
@@ -234,7 +234,7 @@ SELECT CONVERT('foo', 'WIN1251', 'ALT');
(1 row)
-- ISO-8859-5 --> KOI8R
SELECT CONVERT('foo' USING iso_8859_5_to_koi8r);
SELECT CONVERT('foo' USING iso_8859_5_to_koi8
_
r);
convert
---------
foo
...
...
@@ -247,7 +247,7 @@ SELECT CONVERT('foo', 'ISO-8859-5', 'KOI8R');
(1 row)
-- KOI8R --> ISO-8859-5
SELECT CONVERT('foo' USING koi8r_to_iso_8859_5);
SELECT CONVERT('foo' USING koi8
_
r_to_iso_8859_5);
convert
---------
foo
...
...
@@ -260,7 +260,7 @@ SELECT CONVERT('foo', 'KOI8R', 'ISO-8859-5');
(1 row)
-- ISO-8859-5 --> WIN1251
SELECT CONVERT('foo' USING iso_8859_5_to_win1251);
SELECT CONVERT('foo' USING iso_8859_5_to_win
dows_
1251);
convert
---------
foo
...
...
@@ -273,7 +273,7 @@ SELECT CONVERT('foo', 'ISO-8859-5', 'WIN1251');
(1 row)
-- WIN1251 --> ISO-8859-5
SELECT CONVERT('foo' USING win1251_to_iso_8859_5);
SELECT CONVERT('foo' USING win
dows_
1251_to_iso_8859_5);
convert
---------
foo
...
...
@@ -286,7 +286,7 @@ SELECT CONVERT('foo', 'WIN1251', 'ISO-8859-5');
(1 row)
-- ISO-8859-5 --> ALT
SELECT CONVERT('foo' USING iso_8859_5_to_win866);
SELECT CONVERT('foo' USING iso_8859_5_to_win
dows_
866);
convert
---------
foo
...
...
@@ -299,7 +299,7 @@ SELECT CONVERT('foo', 'ISO-8859-5', 'ALT');
(1 row)
-- ALT --> ISO-8859-5
SELECT CONVERT('foo' USING win866_to_iso_8859_5);
SELECT CONVERT('foo' USING win
dows_
866_to_iso_8859_5);
convert
---------
foo
...
...
@@ -546,7 +546,7 @@ SELECT CONVERT('foo', 'MULE_INTERNAL', 'LATIN2');
(1 row)
-- WIN1250 --> MULE_INTERNAL
SELECT CONVERT('foo' USING win1250_to_mic);
SELECT CONVERT('foo' USING win
dows_
1250_to_mic);
convert
---------
foo
...
...
@@ -559,7 +559,7 @@ SELECT CONVERT('foo', 'WIN1250', 'MULE_INTERNAL');
(1 row)
-- MULE_INTERNAL --> WIN1250
SELECT CONVERT('foo' USING mic_to_win1250);
SELECT CONVERT('foo' USING mic_to_win
dows_
1250);
convert
---------
foo
...
...
@@ -572,7 +572,7 @@ SELECT CONVERT('foo', 'MULE_INTERNAL', 'WIN1250');
(1 row)
-- LATIN2 --> WIN1250
SELECT CONVERT('foo' USING iso_8859_2_to_win1250);
SELECT CONVERT('foo' USING iso_8859_2_to_win
dows_
1250);
convert
---------
foo
...
...
@@ -585,7 +585,7 @@ SELECT CONVERT('foo', 'LATIN2', 'WIN1250');
(1 row)
-- WIN1250 --> LATIN2
SELECT CONVERT('foo' USING win1250_to_iso_8859_2);
SELECT CONVERT('foo' USING win
dows_
1250_to_iso_8859_2);
convert
---------
foo
...
...
@@ -728,7 +728,7 @@ SELECT CONVERT('foo', 'UNICODE', 'BIG5');
(1 row)
-- UNICODE --> KOI8R
SELECT CONVERT('foo' USING utf_8_to_koi8r);
SELECT CONVERT('foo' USING utf_8_to_koi8
_
r);
convert
---------
foo
...
...
@@ -741,7 +741,7 @@ SELECT CONVERT('foo', 'UNICODE', 'KOI8R');
(1 row)
-- KOI8R --> UNICODE
SELECT CONVERT('foo' USING koi8r_to_utf_8);
SELECT CONVERT('foo' USING koi8
_
r_to_utf_8);
convert
---------
foo
...
...
@@ -754,7 +754,7 @@ SELECT CONVERT('foo', 'KOI8R', 'UNICODE');
(1 row)
-- UNICODE --> WIN1251
SELECT CONVERT('foo' USING utf_8_to_win1251);
SELECT CONVERT('foo' USING utf_8_to_win
dows_
1251);
convert
---------
foo
...
...
@@ -767,7 +767,7 @@ SELECT CONVERT('foo', 'UNICODE', 'WIN1251');
(1 row)
-- WIN1251 --> UNICODE
SELECT CONVERT('foo' USING win1251_to_utf_8);
SELECT CONVERT('foo' USING win
dows_
1251_to_utf_8);
convert
---------
foo
...
...
@@ -780,7 +780,7 @@ SELECT CONVERT('foo', 'WIN1251', 'UNICODE');
(1 row)
-- UNICODE --> ALT
SELECT CONVERT('foo' USING utf_8_to_win866);
SELECT CONVERT('foo' USING utf_8_to_win
dows_
866);
convert
---------
foo
...
...
@@ -793,7 +793,7 @@ SELECT CONVERT('foo', 'UNICODE', 'ALT');
(1 row)
-- ALT --> UNICODE
SELECT CONVERT('foo' USING win866_to_utf_8);
SELECT CONVERT('foo' USING win
dows_
866_to_utf_8);
convert
---------
foo
...
...
@@ -1430,7 +1430,7 @@ SELECT CONVERT('foo', 'UNICODE', 'UHC');
(1 row)
-- UNICODE --> WIN1250
SELECT CONVERT('foo' USING utf_8_to_win1250);
SELECT CONVERT('foo' USING utf_8_to_win
dows_
1250);
convert
---------
foo
...
...
@@ -1443,7 +1443,7 @@ SELECT CONVERT('foo', 'UNICODE', 'WIN1250');
(1 row)
-- WIN1250 --> UNICODE
SELECT CONVERT('foo' USING win1250_to_utf_8);
SELECT CONVERT('foo' USING win
dows_
1250_to_utf_8);
convert
---------
foo
...
...
@@ -1456,7 +1456,7 @@ SELECT CONVERT('foo', 'WIN1250', 'UNICODE');
(1 row)
-- UNICODE --> WIN1256
SELECT CONVERT('foo' USING utf_8_to_win1256);
SELECT CONVERT('foo' USING utf_8_to_win
dows_
1256);
convert
---------
foo
...
...
@@ -1469,7 +1469,7 @@ SELECT CONVERT('foo', 'UNICODE', 'WIN1256');
(1 row)
-- WIN1256 --> UNICODE
SELECT CONVERT('foo' USING win1256_to_utf_8);
SELECT CONVERT('foo' USING win
dows_
1256_to_utf_8);
convert
---------
foo
...
...
@@ -1482,7 +1482,7 @@ SELECT CONVERT('foo', 'WIN1256', 'UNICODE');
(1 row)
-- UNICODE --> WIN874
SELECT CONVERT('foo' USING utf_8_to_win874);
SELECT CONVERT('foo' USING utf_8_to_win
dows_
874);
convert
---------
foo
...
...
@@ -1495,7 +1495,7 @@ SELECT CONVERT('foo', 'UNICODE', 'WIN874');
(1 row)
-- WIN874 --> UNICODE
SELECT CONVERT('foo' USING win874_to_utf_8);
SELECT CONVERT('foo' USING win
dows_
874_to_utf_8);
convert
---------
foo
...
...
src/test/regress/sql/conversion.sql
View file @
8c3ab663
...
...
@@ -30,10 +30,10 @@ SELECT CONVERT('foo', 'SQL_ASCII', 'MULE_INTERNAL');
SELECT
CONVERT
(
'foo'
USING
mic_to_ascii
);
SELECT
CONVERT
(
'foo'
,
'MULE_INTERNAL'
,
'SQL_ASCII'
);
-- KOI8R --> MULE_INTERNAL
SELECT
CONVERT
(
'foo'
USING
koi8r_to_mic
);
SELECT
CONVERT
(
'foo'
USING
koi8
_
r_to_mic
);
SELECT
CONVERT
(
'foo'
,
'KOI8R'
,
'MULE_INTERNAL'
);
-- MULE_INTERNAL --> KOI8R
SELECT
CONVERT
(
'foo'
USING
mic_to_koi8r
);
SELECT
CONVERT
(
'foo'
USING
mic_to_koi8
_
r
);
SELECT
CONVERT
(
'foo'
,
'MULE_INTERNAL'
,
'KOI8R'
);
-- ISO-8859-5 --> MULE_INTERNAL
SELECT
CONVERT
(
'foo'
USING
iso_8859_5_to_mic
);
...
...
@@ -42,52 +42,52 @@ SELECT CONVERT('foo', 'ISO-8859-5', 'MULE_INTERNAL');
SELECT
CONVERT
(
'foo'
USING
mic_to_iso_8859_5
);
SELECT
CONVERT
(
'foo'
,
'MULE_INTERNAL'
,
'ISO-8859-5'
);
-- WIN1251 --> MULE_INTERNAL
SELECT
CONVERT
(
'foo'
USING
win1251_to_mic
);
SELECT
CONVERT
(
'foo'
USING
win
dows_
1251_to_mic
);
SELECT
CONVERT
(
'foo'
,
'WIN1251'
,
'MULE_INTERNAL'
);
-- MULE_INTERNAL --> WIN1251
SELECT
CONVERT
(
'foo'
USING
mic_to_win1251
);
SELECT
CONVERT
(
'foo'
USING
mic_to_win
dows_
1251
);
SELECT
CONVERT
(
'foo'
,
'MULE_INTERNAL'
,
'WIN1251'
);
-- ALT --> MULE_INTERNAL
SELECT
CONVERT
(
'foo'
USING
win866_to_mic
);
SELECT
CONVERT
(
'foo'
USING
win
dows_
866_to_mic
);
SELECT
CONVERT
(
'foo'
,
'ALT'
,
'MULE_INTERNAL'
);
-- MULE_INTERNAL --> ALT
SELECT
CONVERT
(
'foo'
USING
mic_to_win866
);
SELECT
CONVERT
(
'foo'
USING
mic_to_win
dows_
866
);
SELECT
CONVERT
(
'foo'
,
'MULE_INTERNAL'
,
'ALT'
);
-- KOI8R --> WIN1251
SELECT
CONVERT
(
'foo'
USING
koi8
r_to_win
1251
);
SELECT
CONVERT
(
'foo'
USING
koi8
_r_to_windows_
1251
);
SELECT
CONVERT
(
'foo'
,
'KOI8R'
,
'WIN1251'
);
-- WIN1251 --> KOI8R
SELECT
CONVERT
(
'foo'
USING
win
1251_to_koi8
r
);
SELECT
CONVERT
(
'foo'
USING
win
dows_1251_to_koi8_
r
);
SELECT
CONVERT
(
'foo'
,
'WIN1251'
,
'KOI8R'
);
-- KOI8R --> ALT
SELECT
CONVERT
(
'foo'
USING
koi8
r_to_win
866
);
SELECT
CONVERT
(
'foo'
USING
koi8
_r_to_windows_
866
);
SELECT
CONVERT
(
'foo'
,
'KOI8R'
,
'ALT'
);
-- ALT --> KOI8R
SELECT
CONVERT
(
'foo'
USING
win
866_to_koi8
r
);
SELECT
CONVERT
(
'foo'
USING
win
dows_866_to_koi8_
r
);
SELECT
CONVERT
(
'foo'
,
'ALT'
,
'KOI8R'
);
-- ALT --> WIN1251
SELECT
CONVERT
(
'foo'
USING
win
866_to_win
1251
);
SELECT
CONVERT
(
'foo'
USING
win
dows_866_to_windows_
1251
);
SELECT
CONVERT
(
'foo'
,
'ALT'
,
'WIN1251'
);
-- WIN1251 --> ALT
SELECT
CONVERT
(
'foo'
USING
win
1251_to_win
866
);
SELECT
CONVERT
(
'foo'
USING
win
dows_1251_to_windows_
866
);
SELECT
CONVERT
(
'foo'
,
'WIN1251'
,
'ALT'
);
-- ISO-8859-5 --> KOI8R
SELECT
CONVERT
(
'foo'
USING
iso_8859_5_to_koi8r
);
SELECT
CONVERT
(
'foo'
USING
iso_8859_5_to_koi8
_
r
);
SELECT
CONVERT
(
'foo'
,
'ISO-8859-5'
,
'KOI8R'
);
-- KOI8R --> ISO-8859-5
SELECT
CONVERT
(
'foo'
USING
koi8r_to_iso_8859_5
);
SELECT
CONVERT
(
'foo'
USING
koi8
_
r_to_iso_8859_5
);
SELECT
CONVERT
(
'foo'
,
'KOI8R'
,
'ISO-8859-5'
);
-- ISO-8859-5 --> WIN1251
SELECT
CONVERT
(
'foo'
USING
iso_8859_5_to_win1251
);
SELECT
CONVERT
(
'foo'
USING
iso_8859_5_to_win
dows_
1251
);
SELECT
CONVERT
(
'foo'
,
'ISO-8859-5'
,
'WIN1251'
);
-- WIN1251 --> ISO-8859-5
SELECT
CONVERT
(
'foo'
USING
win1251_to_iso_8859_5
);
SELECT
CONVERT
(
'foo'
USING
win
dows_
1251_to_iso_8859_5
);
SELECT
CONVERT
(
'foo'
,
'WIN1251'
,
'ISO-8859-5'
);
-- ISO-8859-5 --> ALT
SELECT
CONVERT
(
'foo'
USING
iso_8859_5_to_win866
);
SELECT
CONVERT
(
'foo'
USING
iso_8859_5_to_win
dows_
866
);
SELECT
CONVERT
(
'foo'
,
'ISO-8859-5'
,
'ALT'
);
-- ALT --> ISO-8859-5
SELECT
CONVERT
(
'foo'
USING
win866_to_iso_8859_5
);
SELECT
CONVERT
(
'foo'
USING
win
dows_
866_to_iso_8859_5
);
SELECT
CONVERT
(
'foo'
,
'ALT'
,
'ISO-8859-5'
);
-- EUC_CN --> MULE_INTERNAL
SELECT
CONVERT
(
'foo'
USING
euc_cn_to_mic
);
...
...
@@ -144,16 +144,16 @@ SELECT CONVERT('foo', 'LATIN2', 'MULE_INTERNAL');
SELECT
CONVERT
(
'foo'
USING
mic_to_iso_8859_2
);
SELECT
CONVERT
(
'foo'
,
'MULE_INTERNAL'
,
'LATIN2'
);
-- WIN1250 --> MULE_INTERNAL
SELECT
CONVERT
(
'foo'
USING
win1250_to_mic
);
SELECT
CONVERT
(
'foo'
USING
win
dows_
1250_to_mic
);
SELECT
CONVERT
(
'foo'
,
'WIN1250'
,
'MULE_INTERNAL'
);
-- MULE_INTERNAL --> WIN1250
SELECT
CONVERT
(
'foo'
USING
mic_to_win1250
);
SELECT
CONVERT
(
'foo'
USING
mic_to_win
dows_
1250
);
SELECT
CONVERT
(
'foo'
,
'MULE_INTERNAL'
,
'WIN1250'
);
-- LATIN2 --> WIN1250
SELECT
CONVERT
(
'foo'
USING
iso_8859_2_to_win1250
);
SELECT
CONVERT
(
'foo'
USING
iso_8859_2_to_win
dows_
1250
);
SELECT
CONVERT
(
'foo'
,
'LATIN2'
,
'WIN1250'
);
-- WIN1250 --> LATIN2
SELECT
CONVERT
(
'foo'
USING
win1250_to_iso_8859_2
);
SELECT
CONVERT
(
'foo'
USING
win
dows_
1250_to_iso_8859_2
);
SELECT
CONVERT
(
'foo'
,
'WIN1250'
,
'LATIN2'
);
-- LATIN1 --> MULE_INTERNAL
SELECT
CONVERT
(
'foo'
USING
iso_8859_1_to_mic
);
...
...
@@ -186,22 +186,22 @@ SELECT CONVERT('foo', 'BIG5', 'UNICODE');
SELECT
CONVERT
(
'foo'
USING
utf_8_to_big5
);
SELECT
CONVERT
(
'foo'
,
'UNICODE'
,
'BIG5'
);
-- UNICODE --> KOI8R
SELECT
CONVERT
(
'foo'
USING
utf_8_to_koi8r
);
SELECT
CONVERT
(
'foo'
USING
utf_8_to_koi8
_
r
);
SELECT
CONVERT
(
'foo'
,
'UNICODE'
,
'KOI8R'
);
-- KOI8R --> UNICODE
SELECT
CONVERT
(
'foo'
USING
koi8r_to_utf_8
);
SELECT
CONVERT
(
'foo'
USING
koi8
_
r_to_utf_8
);
SELECT
CONVERT
(
'foo'
,
'KOI8R'
,
'UNICODE'
);
-- UNICODE --> WIN1251
SELECT
CONVERT
(
'foo'
USING
utf_8_to_win1251
);
SELECT
CONVERT
(
'foo'
USING
utf_8_to_win
dows_
1251
);
SELECT
CONVERT
(
'foo'
,
'UNICODE'
,
'WIN1251'
);
-- WIN1251 --> UNICODE
SELECT
CONVERT
(
'foo'
USING
win1251_to_utf_8
);
SELECT
CONVERT
(
'foo'
USING
win
dows_
1251_to_utf_8
);
SELECT
CONVERT
(
'foo'
,
'WIN1251'
,
'UNICODE'
);
-- UNICODE --> ALT
SELECT
CONVERT
(
'foo'
USING
utf_8_to_win866
);
SELECT
CONVERT
(
'foo'
USING
utf_8_to_win
dows_
866
);
SELECT
CONVERT
(
'foo'
,
'UNICODE'
,
'ALT'
);
-- ALT --> UNICODE
SELECT
CONVERT
(
'foo'
USING
win866_to_utf_8
);
SELECT
CONVERT
(
'foo'
USING
win
dows_
866_to_utf_8
);
SELECT
CONVERT
(
'foo'
,
'ALT'
,
'UNICODE'
);
-- EUC_CN --> UNICODE
SELECT
CONVERT
(
'foo'
USING
euc_cn_to_utf_8
);
...
...
@@ -348,22 +348,22 @@ SELECT CONVERT('foo', 'UHC', 'UNICODE');
SELECT
CONVERT
(
'foo'
USING
utf_8_to_uhc
);
SELECT
CONVERT
(
'foo'
,
'UNICODE'
,
'UHC'
);
-- UNICODE --> WIN1250
SELECT
CONVERT
(
'foo'
USING
utf_8_to_win1250
);
SELECT
CONVERT
(
'foo'
USING
utf_8_to_win
dows_
1250
);
SELECT
CONVERT
(
'foo'
,
'UNICODE'
,
'WIN1250'
);
-- WIN1250 --> UNICODE
SELECT
CONVERT
(
'foo'
USING
win1250_to_utf_8
);
SELECT
CONVERT
(
'foo'
USING
win
dows_
1250_to_utf_8
);
SELECT
CONVERT
(
'foo'
,
'WIN1250'
,
'UNICODE'
);
-- UNICODE --> WIN1256
SELECT
CONVERT
(
'foo'
USING
utf_8_to_win1256
);
SELECT
CONVERT
(
'foo'
USING
utf_8_to_win
dows_
1256
);
SELECT
CONVERT
(
'foo'
,
'UNICODE'
,
'WIN1256'
);
-- WIN1256 --> UNICODE
SELECT
CONVERT
(
'foo'
USING
win1256_to_utf_8
);
SELECT
CONVERT
(
'foo'
USING
win
dows_
1256_to_utf_8
);
SELECT
CONVERT
(
'foo'
,
'WIN1256'
,
'UNICODE'
);
-- UNICODE --> WIN874
SELECT
CONVERT
(
'foo'
USING
utf_8_to_win874
);
SELECT
CONVERT
(
'foo'
USING
utf_8_to_win
dows_
874
);
SELECT
CONVERT
(
'foo'
,
'UNICODE'
,
'WIN874'
);
-- WIN874 --> UNICODE
SELECT
CONVERT
(
'foo'
USING
win874_to_utf_8
);
SELECT
CONVERT
(
'foo'
USING
win
dows_
874_to_utf_8
);
SELECT
CONVERT
(
'foo'
,
'WIN874'
,
'UNICODE'
);
--
-- return to the super user
...
...
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