I have committed many support files for CREATE CONVERSION. Default
Tatsuo Ishii <ishii@postgresql.org>
I have committed many support files for CREATE CONVERSION. Default conversion procs and conversions are added in initdb. Currently supported conversions are: UTF-8(UNICODE) <--> SQL_ASCII, ISO-8859-1 to 16, EUC_JP, EUC_KR, EUC_CN, EUC_TW, SJIS, BIG5, GBK, GB18030, UHC, JOHAB, TCVN EUC_JP <--> SJIS EUC_TW <--> BIG5 MULE_INTERNAL <--> EUC_JP, SJIS, EUC_TW, BIG5 Note that initial contents of pg_conversion system catalog are created in the initdb process. So doing initdb required is ideal, it's possible to add them to your databases by hand, however. To accomplish this: psql -f your_postgresql_install_path/share/conversion_create.sql your_database So I did not bump up the version in cataversion.h. TODO: Add more conversion procs Add [CASCADE|RESTRICT] to DROP CONVERSION Add tuples to pg_depend Add regression tests Write docs Add SQL99 CONVERT command? -- Tatsuo Ishii
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/variable.c | modified | +8 −29 |
| src/backend/Makefile | modified | +2 −1 |
| src/backend/parser/gram.y | modified | +10 −21 |
| src/backend/utils/mb/big5.c | deleted | +0 −378 |
| src/backend/utils/mb/conv.c | modified | +31 −1215 |
| src/backend/utils/mb/Makefile | modified | +10 −6 |
| src/backend/utils/mb/mbutils.c | modified | +84 −170 |
| src/backend/utils/mb/sjis.map | deleted | +0 −396 |
| src/backend/utils/misc/guc.c | modified | +2 −3 |
| src/bin/initdb/initdb.sh | modified | +6 −1 |
| src/bin/psql/command.c | modified | +2 −13 |
| src/include/mb/pg_wchar.h | modified | +17 −32 |
| src/interfaces/libpq/fe-connect.c | modified | +1 −11 |