catalogs, <filename>genbki.pl</filename> provides mechanisms to write
symbolic references instead. Currently this is possible for references
to access methods, functions, languages,
- operators, opclasses, opfamilies, and types.
+ operators, opclasses, opfamilies, types, and encodings.
The rules are as follows:
</para>
is <literal>pg_am</literal>, <literal>pg_proc</literal>,
<literal>pg_language</literal>,
<literal>pg_operator</literal>, <literal>pg_opclass</literal>,
- <literal>pg_opfamily</literal>, or <literal>pg_type</literal>.
+ <literal>pg_opfamily</literal>,
+ <literal>pg_type</literal>,
+ or <literal>encoding</literal>.
<literal>BKI_LOOKUP</literal> can be attached to columns of
type <type>Oid</type>, <type>regproc</type>, <type>oidvector</type>,
or <type>Oid[]</type>; in the latter two cases it implies performing a
lookup on each element of the array.
+ It's also permissible to attach <literal>BKI_LOOKUP</literal>
+ to integer columns; this should be done only for encodings,
+ which are not currently represented as catalog OIDs.
</para>
</listitem>
# The .dat files we need can just be listed alphabetically.
POSTGRES_BKI_DATA = $(addprefix $(top_srcdir)/src/include/catalog/,\
pg_aggregate.dat pg_am.dat pg_amop.dat pg_amproc.dat pg_authid.dat \
- pg_cast.dat pg_class.dat pg_collation.dat \
+ pg_cast.dat pg_class.dat pg_collation.dat pg_conversion.dat \
pg_database.dat pg_language.dat \
pg_namespace.dat pg_opclass.dat pg_operator.dat pg_opfamily.dat \
pg_pltemplate.dat pg_proc.dat pg_range.dat pg_tablespace.dat \
die "--set-version must be specified.\n" if !defined $major_version;
die "-I, the header include path, must be specified.\n" if !$include_path;
-# Make sure output_path ends in a slash.
+# Make sure paths end with a slash.
if ($output_path ne '' && substr($output_path, -1) ne '/')
{
$output_path .= '/';
}
+if (substr($include_path, -1) ne '/')
+{
+ $include_path .= '/';
+}
# Read all the files into internal data structures.
my @catnames;
'PG_CATALOG_NAMESPACE');
-# Build lookup tables for OID macro substitutions and for pg_attribute
-# copies of pg_type values.
+# Build lookup tables.
# access method OID lookup
my %amoids;
my %types;
foreach my $row (@{ $catalog_data{pg_type} })
{
+ # for OID macro substitutions
$typeoids{ $row->{typname} } = $row->{oid};
+
+ # for pg_attribute copies of pg_type values
$types{ $row->{typname} } = $row;
}
-# Map catalog name to OID lookup.
+# Encoding identifier lookup. This uses the same replacement machinery
+# as for OIDs, but we have to dig the values out of pg_wchar.h.
+my %encids;
+
+my $encfile = $include_path . 'mb/pg_wchar.h';
+open(my $ef, '<', $encfile) || die "$encfile: $!";
+
+# We're parsing an enum, so start with 0 and increment
+# every time we find an enum member.
+my $encid = 0;
+my $collect_encodings = 0;
+while (<$ef>)
+{
+ if (/typedef\s+enum\s+pg_enc/)
+ {
+ $collect_encodings = 1;
+ next;
+ }
+
+ last if /_PG_LAST_ENCODING_/;
+
+ if ($collect_encodings and /^\s+(PG_\w+)/)
+ {
+ $encids{$1} = $encid;
+ $encid++;
+ }
+}
+
+close $ef;
+
+# Map lookup name to the corresponding hash table.
my %lookup_kind = (
pg_am => \%amoids,
pg_language => \%langoids,
pg_operator => \%operoids,
pg_opfamily => \%opfoids,
pg_proc => \%procoids,
- pg_type => \%typeoids);
+ pg_type => \%typeoids,
+ encoding => \%encids);
# Open temp files
+++ /dev/null
-/conversion_create.sql
#-------------------------------------------------------------------------
#
-# Makefile--
-# Makefile for utils/mb/conversion_procs
+# Makefile for backend/utils/mb/conversion_procs
#
-# IDENTIFICATION
-# src/backend/utils/mb/conversion_procs/Makefile
+# Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
+# Portions Copyright (c) 1994, Regents of the University of California
+#
+# src/backend/utils/mb/conversion_procs/Makefile
#
#-------------------------------------------------------------------------
top_builddir = ../../../../..
include $(top_builddir)/src/Makefile.global
-SQLSCRIPT = conversion_create.sql
-
SUBDIRS = \
ascii_and_mic cyrillic_and_mic euc_cn_and_mic euc_jp_and_sjis \
euc_kr_and_mic euc_tw_and_big5 latin2_and_win1250 latin_and_mic \
utf8_and_euc2004 utf8_and_sjis2004 euc2004_sjis2004
$(recurse)
-
-# conversion_name source_encoding destination_encoding function object
-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 \
- 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 \
- windows_1251_to_mic WIN1251 MULE_INTERNAL win1251_to_mic cyrillic_and_mic \
- mic_to_windows_1251 MULE_INTERNAL WIN1251 mic_to_win1251 cyrillic_and_mic \
- windows_866_to_mic WIN866 MULE_INTERNAL win866_to_mic cyrillic_and_mic \
- mic_to_windows_866 MULE_INTERNAL WIN866 mic_to_win866 cyrillic_and_mic \
- koi8_r_to_windows_1251 KOI8R WIN1251 koi8r_to_win1251 cyrillic_and_mic \
- windows_1251_to_koi8_r WIN1251 KOI8R win1251_to_koi8r cyrillic_and_mic \
- koi8_r_to_windows_866 KOI8R WIN866 koi8r_to_win866 cyrillic_and_mic \
- windows_866_to_koi8_r WIN866 KOI8R win866_to_koi8r cyrillic_and_mic \
- windows_866_to_windows_1251 WIN866 WIN1251 win866_to_win1251 cyrillic_and_mic \
- windows_1251_to_windows_866 WIN1251 WIN866 win1251_to_win866 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_windows_1251 ISO-8859-5 WIN1251 iso_to_win1251 cyrillic_and_mic \
- windows_1251_to_iso_8859_5 WIN1251 ISO-8859-5 win1251_to_iso cyrillic_and_mic \
- iso_8859_5_to_windows_866 ISO-8859-5 WIN866 iso_to_win866 cyrillic_and_mic \
- windows_866_to_iso_8859_5 WIN866 ISO-8859-5 win866_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 \
- sjis_to_euc_jp SJIS EUC_JP sjis_to_euc_jp euc_jp_and_sjis \
- euc_jp_to_mic EUC_JP MULE_INTERNAL euc_jp_to_mic euc_jp_and_sjis \
- sjis_to_mic SJIS MULE_INTERNAL sjis_to_mic euc_jp_and_sjis \
- mic_to_euc_jp MULE_INTERNAL EUC_JP mic_to_euc_jp euc_jp_and_sjis \
- mic_to_sjis MULE_INTERNAL SJIS mic_to_sjis euc_jp_and_sjis \
- euc_kr_to_mic EUC_KR MULE_INTERNAL euc_kr_to_mic euc_kr_and_mic \
- mic_to_euc_kr MULE_INTERNAL EUC_KR mic_to_euc_kr euc_kr_and_mic \
- euc_tw_to_big5 EUC_TW BIG5 euc_tw_to_big5 euc_tw_and_big5 \
- big5_to_euc_tw BIG5 EUC_TW big5_to_euc_tw euc_tw_and_big5 \
- euc_tw_to_mic EUC_TW MULE_INTERNAL euc_tw_to_mic euc_tw_and_big5 \
- big5_to_mic BIG5 MULE_INTERNAL big5_to_mic euc_tw_and_big5 \
- mic_to_euc_tw MULE_INTERNAL EUC_TW mic_to_euc_tw euc_tw_and_big5 \
- 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 \
- windows_1250_to_mic WIN1250 MULE_INTERNAL win1250_to_mic latin2_and_win1250 \
- mic_to_windows_1250 MULE_INTERNAL WIN1250 mic_to_win1250 latin2_and_win1250 \
- iso_8859_2_to_windows_1250 LATIN2 WIN1250 latin2_to_win1250 latin2_and_win1250 \
- windows_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 \
- mic_to_iso_8859_3 MULE_INTERNAL LATIN3 mic_to_latin3 latin_and_mic \
- iso_8859_4_to_mic LATIN4 MULE_INTERNAL latin4_to_mic latin_and_mic \
- mic_to_iso_8859_4 MULE_INTERNAL LATIN4 mic_to_latin4 latin_and_mic \
- ascii_to_utf8 SQL_ASCII UTF8 ascii_to_utf8 utf8_and_ascii \
- utf8_to_ascii UTF8 SQL_ASCII utf8_to_ascii utf8_and_ascii \
- big5_to_utf8 BIG5 UTF8 big5_to_utf8 utf8_and_big5 \
- utf8_to_big5 UTF8 BIG5 utf8_to_big5 utf8_and_big5 \
- utf8_to_koi8_r UTF8 KOI8R utf8_to_koi8r utf8_and_cyrillic \
- koi8_r_to_utf8 KOI8R UTF8 koi8r_to_utf8 utf8_and_cyrillic \
- utf8_to_koi8_u UTF8 KOI8U utf8_to_koi8u utf8_and_cyrillic \
- koi8_u_to_utf8 KOI8U UTF8 koi8u_to_utf8 utf8_and_cyrillic \
- utf8_to_windows_866 UTF8 WIN866 utf8_to_win utf8_and_win \
- windows_866_to_utf8 WIN866 UTF8 win_to_utf8 utf8_and_win \
- utf8_to_windows_874 UTF8 WIN874 utf8_to_win utf8_and_win \
- windows_874_to_utf8 WIN874 UTF8 win_to_utf8 utf8_and_win \
- utf8_to_windows_1250 UTF8 WIN1250 utf8_to_win utf8_and_win \
- windows_1250_to_utf8 WIN1250 UTF8 win_to_utf8 utf8_and_win \
- utf8_to_windows_1251 UTF8 WIN1251 utf8_to_win utf8_and_win \
- windows_1251_to_utf8 WIN1251 UTF8 win_to_utf8 utf8_and_win \
- utf8_to_windows_1252 UTF8 WIN1252 utf8_to_win utf8_and_win \
- windows_1252_to_utf8 WIN1252 UTF8 win_to_utf8 utf8_and_win \
- utf8_to_windows_1253 UTF8 WIN1253 utf8_to_win utf8_and_win \
- windows_1253_to_utf8 WIN1253 UTF8 win_to_utf8 utf8_and_win \
- utf8_to_windows_1254 UTF8 WIN1254 utf8_to_win utf8_and_win \
- windows_1254_to_utf8 WIN1254 UTF8 win_to_utf8 utf8_and_win \
- utf8_to_windows_1255 UTF8 WIN1255 utf8_to_win utf8_and_win \
- windows_1255_to_utf8 WIN1255 UTF8 win_to_utf8 utf8_and_win \
- utf8_to_windows_1256 UTF8 WIN1256 utf8_to_win utf8_and_win \
- windows_1256_to_utf8 WIN1256 UTF8 win_to_utf8 utf8_and_win \
- utf8_to_windows_1257 UTF8 WIN1257 utf8_to_win utf8_and_win \
- windows_1257_to_utf8 WIN1257 UTF8 win_to_utf8 utf8_and_win \
- utf8_to_windows_1258 UTF8 WIN1258 utf8_to_win utf8_and_win \
- windows_1258_to_utf8 WIN1258 UTF8 win_to_utf8 utf8_and_win \
- euc_cn_to_utf8 EUC_CN UTF8 euc_cn_to_utf8 utf8_and_euc_cn \
- utf8_to_euc_cn UTF8 EUC_CN utf8_to_euc_cn utf8_and_euc_cn \
- euc_jp_to_utf8 EUC_JP UTF8 euc_jp_to_utf8 utf8_and_euc_jp \
- utf8_to_euc_jp UTF8 EUC_JP utf8_to_euc_jp utf8_and_euc_jp \
- euc_kr_to_utf8 EUC_KR UTF8 euc_kr_to_utf8 utf8_and_euc_kr \
- utf8_to_euc_kr UTF8 EUC_KR utf8_to_euc_kr utf8_and_euc_kr \
- euc_tw_to_utf8 EUC_TW UTF8 euc_tw_to_utf8 utf8_and_euc_tw \
- utf8_to_euc_tw UTF8 EUC_TW utf8_to_euc_tw utf8_and_euc_tw \
- gb18030_to_utf8 GB18030 UTF8 gb18030_to_utf8 utf8_and_gb18030 \
- utf8_to_gb18030 UTF8 GB18030 utf8_to_gb18030 utf8_and_gb18030 \
- gbk_to_utf8 GBK UTF8 gbk_to_utf8 utf8_and_gbk \
- utf8_to_gbk UTF8 GBK utf8_to_gbk utf8_and_gbk \
- utf8_to_iso_8859_2 UTF8 LATIN2 utf8_to_iso8859 utf8_and_iso8859 \
- iso_8859_2_to_utf8 LATIN2 UTF8 iso8859_to_utf8 utf8_and_iso8859 \
- utf8_to_iso_8859_3 UTF8 LATIN3 utf8_to_iso8859 utf8_and_iso8859 \
- iso_8859_3_to_utf8 LATIN3 UTF8 iso8859_to_utf8 utf8_and_iso8859 \
- utf8_to_iso_8859_4 UTF8 LATIN4 utf8_to_iso8859 utf8_and_iso8859 \
- iso_8859_4_to_utf8 LATIN4 UTF8 iso8859_to_utf8 utf8_and_iso8859 \
- utf8_to_iso_8859_9 UTF8 LATIN5 utf8_to_iso8859 utf8_and_iso8859 \
- iso_8859_9_to_utf8 LATIN5 UTF8 iso8859_to_utf8 utf8_and_iso8859 \
- utf8_to_iso_8859_10 UTF8 LATIN6 utf8_to_iso8859 utf8_and_iso8859 \
- iso_8859_10_to_utf8 LATIN6 UTF8 iso8859_to_utf8 utf8_and_iso8859 \
- utf8_to_iso_8859_13 UTF8 LATIN7 utf8_to_iso8859 utf8_and_iso8859 \
- iso_8859_13_to_utf8 LATIN7 UTF8 iso8859_to_utf8 utf8_and_iso8859 \
- utf8_to_iso_8859_14 UTF8 LATIN8 utf8_to_iso8859 utf8_and_iso8859 \
- iso_8859_14_to_utf8 LATIN8 UTF8 iso8859_to_utf8 utf8_and_iso8859 \
- utf8_to_iso_8859_15 UTF8 LATIN9 utf8_to_iso8859 utf8_and_iso8859 \
- iso_8859_15_to_utf8 LATIN9 UTF8 iso8859_to_utf8 utf8_and_iso8859 \
- utf8_to_iso_8859_16 UTF8 LATIN10 utf8_to_iso8859 utf8_and_iso8859 \
- iso_8859_16_to_utf8 LATIN10 UTF8 iso8859_to_utf8 utf8_and_iso8859 \
- utf8_to_iso_8859_5 UTF8 ISO-8859-5 utf8_to_iso8859 utf8_and_iso8859 \
- iso_8859_5_to_utf8 ISO-8859-5 UTF8 iso8859_to_utf8 utf8_and_iso8859 \
- utf8_to_iso_8859_6 UTF8 ISO-8859-6 utf8_to_iso8859 utf8_and_iso8859 \
- iso_8859_6_to_utf8 ISO-8859-6 UTF8 iso8859_to_utf8 utf8_and_iso8859 \
- utf8_to_iso_8859_7 UTF8 ISO-8859-7 utf8_to_iso8859 utf8_and_iso8859 \
- iso_8859_7_to_utf8 ISO-8859-7 UTF8 iso8859_to_utf8 utf8_and_iso8859 \
- utf8_to_iso_8859_8 UTF8 ISO-8859-8 utf8_to_iso8859 utf8_and_iso8859 \
- iso_8859_8_to_utf8 ISO-8859-8 UTF8 iso8859_to_utf8 utf8_and_iso8859 \
- iso_8859_1_to_utf8 LATIN1 UTF8 iso8859_1_to_utf8 utf8_and_iso8859_1 \
- utf8_to_iso_8859_1 UTF8 LATIN1 utf8_to_iso8859_1 utf8_and_iso8859_1 \
- johab_to_utf8 JOHAB UTF8 johab_to_utf8 utf8_and_johab \
- utf8_to_johab UTF8 JOHAB utf8_to_johab utf8_and_johab \
- sjis_to_utf8 SJIS UTF8 sjis_to_utf8 utf8_and_sjis \
- utf8_to_sjis UTF8 SJIS utf8_to_sjis utf8_and_sjis \
- uhc_to_utf8 UHC UTF8 uhc_to_utf8 utf8_and_uhc \
- utf8_to_uhc UTF8 UHC utf8_to_uhc utf8_and_uhc \
- euc_jis_2004_to_utf8 EUC_JIS_2004 UTF8 euc_jis_2004_to_utf8 utf8_and_euc2004 \
- utf8_to_euc_jis_2004 UTF8 EUC_JIS_2004 utf8_to_euc_jis_2004 utf8_and_euc2004 \
- shift_jis_2004_to_utf8 SHIFT_JIS_2004 UTF8 shift_jis_2004_to_utf8 utf8_and_sjis2004 \
- utf8_to_shift_jis_2004 UTF8 SHIFT_JIS_2004 utf8_to_shift_jis_2004 utf8_and_sjis2004 \
- euc_jis_2004_to_shift_jis_2004 EUC_JIS_2004 SHIFT_JIS_2004 euc_jis_2004_to_shift_jis_2004 euc2004_sjis2004 \
- shift_jis_2004_to_euc_jis_2004 SHIFT_JIS_2004 EUC_JIS_2004 shift_jis_2004_to_euc_jis_2004 euc2004_sjis2004
-
-all: $(SQLSCRIPT)
-
-$(SQLSCRIPT): Makefile
- @set -e; \
- set $(CONVERSIONS) ; \
- while [ "$$#" -gt 0 ] ; \
- do \
- name=$$1;shift; \
- se=$$1;shift; \
- de=$$1; shift; \
- func=$$1; shift; \
- obj=$$1; shift; \
- echo "-- $$se --> $$de"; \
- echo "CREATE OR REPLACE FUNCTION $$func (INTEGER, INTEGER, CSTRING, INTERNAL, INTEGER) RETURNS VOID AS '$$"libdir"/$$obj', '$$func' LANGUAGE C STRICT PARALLEL SAFE;"; \
- echo "COMMENT ON FUNCTION $$func(INTEGER, INTEGER, CSTRING, INTERNAL, INTEGER) IS 'internal conversion function for $$se to $$de';"; \
- echo "DROP CONVERSION pg_catalog.$$name;"; \
- echo "CREATE DEFAULT CONVERSION pg_catalog.$$name FOR '$$se' TO '$$de' FROM $$func;"; \
- echo "COMMENT ON CONVERSION pg_catalog.$$name IS 'conversion for $$se to $$de';"; \
- echo; \
- done > $@
-
-install: $(SQLSCRIPT) installdirs
- $(INSTALL_DATA) $(SQLSCRIPT) '$(DESTDIR)$(datadir)'
-
-installdirs:
- $(MKDIR_P) '$(DESTDIR)$(datadir)' '$(DESTDIR)$(pkglibdir)'
-
-uninstall:
- rm -f '$(DESTDIR)$(datadir)/$(SQLSCRIPT)'
-
-clean distclean maintainer-clean:
- rm -f $(SQLSCRIPT)
static char *hba_file;
static char *ident_file;
static char *conf_file;
-static char *conversion_file;
static char *dictionary_file;
static char *info_schema_file;
static char *features_file;
static void setup_sysviews(FILE *cmdfd);
static void setup_description(FILE *cmdfd);
static void setup_collation(FILE *cmdfd);
-static void setup_conversion(FILE *cmdfd);
static void setup_dictionary(FILE *cmdfd);
static void setup_privileges(FILE *cmdfd);
static void set_info_version(void);
PG_CMD_PUTS("SELECT pg_import_system_collations('pg_catalog');\n\n");
}
-/*
- * load conversion functions
- */
-static void
-setup_conversion(FILE *cmdfd)
-{
- char **line;
- char **conv_lines;
-
- conv_lines = readfile(conversion_file);
- for (line = conv_lines; *line != NULL; line++)
- {
- if (strstr(*line, "DROP CONVERSION") != *line)
- PG_CMD_PUTS(*line);
- free(*line);
- }
-
- free(conv_lines);
-}
-
/*
* load extra dictionaries (Snowball stemmers)
*/
set_input(&hba_file, "pg_hba.conf.sample");
set_input(&ident_file, "pg_ident.conf.sample");
set_input(&conf_file, "postgresql.conf.sample");
- set_input(&conversion_file, "conversion_create.sql");
set_input(&dictionary_file, "snowball_create.sql");
set_input(&info_schema_file, "information_schema.sql");
set_input(&features_file, "sql_features.txt");
check_input(hba_file);
check_input(ident_file);
check_input(conf_file);
- check_input(conversion_file);
check_input(dictionary_file);
check_input(info_schema_file);
check_input(features_file);
setup_collation(cmdfd);
- setup_conversion(cmdfd);
-
setup_dictionary(cmdfd);
setup_privileges(cmdfd);
*/
/* yyyymmddN */
-#define CATALOG_VERSION_NO 201812311
+#define CATALOG_VERSION_NO 201901031
#endif
#define BKI_DEFAULT(value)
/* Specifies a default value for auto-generated array types */
#define BKI_ARRAY_DEFAULT(value)
-/* Indicates how to perform name lookups for an OID or OID-array field */
+/*
+ * Indicates how to perform name lookups, typically for an OID or
+ * OID-array field
+ */
#define BKI_LOOKUP(catalog)
/* The following are never defined; they are here only for documentation. */
--- /dev/null
+#----------------------------------------------------------------------
+#
+# pg_conversion.dat
+# Initial contents of the pg_conversion system catalog.
+#
+# Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
+# Portions Copyright (c) 1994, Regents of the University of California
+#
+# src/include/catalog/pg_conversion.dat
+#
+#----------------------------------------------------------------------
+
+# Note: conforencoding and contoencoding must match the spelling of
+# the labels used in the enum pg_enc in mb/pg_wchar.h.
+
+[
+
+{ oid => '4400', descr => 'conversion for SQL_ASCII to MULE_INTERNAL',
+ conname => 'ascii_to_mic', conforencoding => 'PG_SQL_ASCII',
+ contoencoding => 'PG_MULE_INTERNAL', conproc => 'ascii_to_mic' },
+{ oid => '4401', descr => 'conversion for MULE_INTERNAL to SQL_ASCII',
+ conname => 'mic_to_ascii', conforencoding => 'PG_MULE_INTERNAL',
+ contoencoding => 'PG_SQL_ASCII', conproc => 'mic_to_ascii' },
+{ oid => '4402', descr => 'conversion for KOI8R to MULE_INTERNAL',
+ conname => 'koi8_r_to_mic', conforencoding => 'PG_KOI8R',
+ contoencoding => 'PG_MULE_INTERNAL', conproc => 'koi8r_to_mic' },
+{ oid => '4403', descr => 'conversion for MULE_INTERNAL to KOI8R',
+ conname => 'mic_to_koi8_r', conforencoding => 'PG_MULE_INTERNAL',
+ contoencoding => 'PG_KOI8R', conproc => 'mic_to_koi8r' },
+{ oid => '4404', descr => 'conversion for ISO-8859-5 to MULE_INTERNAL',
+ conname => 'iso_8859_5_to_mic', conforencoding => 'PG_ISO_8859_5',
+ contoencoding => 'PG_MULE_INTERNAL', conproc => 'iso_to_mic' },
+{ oid => '4405', descr => 'conversion for MULE_INTERNAL to ISO-8859-5',
+ conname => 'mic_to_iso_8859_5', conforencoding => 'PG_MULE_INTERNAL',
+ contoencoding => 'PG_ISO_8859_5', conproc => 'mic_to_iso' },
+{ oid => '4406', descr => 'conversion for WIN1251 to MULE_INTERNAL',
+ conname => 'windows_1251_to_mic', conforencoding => 'PG_WIN1251',
+ contoencoding => 'PG_MULE_INTERNAL', conproc => 'win1251_to_mic' },
+{ oid => '4407', descr => 'conversion for MULE_INTERNAL to WIN1251',
+ conname => 'mic_to_windows_1251', conforencoding => 'PG_MULE_INTERNAL',
+ contoencoding => 'PG_WIN1251', conproc => 'mic_to_win1251' },
+{ oid => '4408', descr => 'conversion for WIN866 to MULE_INTERNAL',
+ conname => 'windows_866_to_mic', conforencoding => 'PG_WIN866',
+ contoencoding => 'PG_MULE_INTERNAL', conproc => 'win866_to_mic' },
+{ oid => '4409', descr => 'conversion for MULE_INTERNAL to WIN866',
+ conname => 'mic_to_windows_866', conforencoding => 'PG_MULE_INTERNAL',
+ contoencoding => 'PG_WIN866', conproc => 'mic_to_win866' },
+{ oid => '4410', descr => 'conversion for KOI8R to WIN1251',
+ conname => 'koi8_r_to_windows_1251', conforencoding => 'PG_KOI8R',
+ contoencoding => 'PG_WIN1251', conproc => 'koi8r_to_win1251' },
+{ oid => '4411', descr => 'conversion for WIN1251 to KOI8R',
+ conname => 'windows_1251_to_koi8_r', conforencoding => 'PG_WIN1251',
+ contoencoding => 'PG_KOI8R', conproc => 'win1251_to_koi8r' },
+{ oid => '4412', descr => 'conversion for KOI8R to WIN866',
+ conname => 'koi8_r_to_windows_866', conforencoding => 'PG_KOI8R',
+ contoencoding => 'PG_WIN866', conproc => 'koi8r_to_win866' },
+{ oid => '4413', descr => 'conversion for WIN866 to KOI8R',
+ conname => 'windows_866_to_koi8_r', conforencoding => 'PG_WIN866',
+ contoencoding => 'PG_KOI8R', conproc => 'win866_to_koi8r' },
+{ oid => '4414', descr => 'conversion for WIN866 to WIN1251',
+ conname => 'windows_866_to_windows_1251', conforencoding => 'PG_WIN866',
+ contoencoding => 'PG_WIN1251', conproc => 'win866_to_win1251' },
+{ oid => '4415', descr => 'conversion for WIN1251 to WIN866',
+ conname => 'windows_1251_to_windows_866', conforencoding => 'PG_WIN1251',
+ contoencoding => 'PG_WIN866', conproc => 'win1251_to_win866' },
+{ oid => '4416', descr => 'conversion for ISO-8859-5 to KOI8R',
+ conname => 'iso_8859_5_to_koi8_r', conforencoding => 'PG_ISO_8859_5',
+ contoencoding => 'PG_KOI8R', conproc => 'iso_to_koi8r' },
+{ oid => '4417', descr => 'conversion for KOI8R to ISO-8859-5',
+ conname => 'koi8_r_to_iso_8859_5', conforencoding => 'PG_KOI8R',
+ contoencoding => 'PG_ISO_8859_5', conproc => 'koi8r_to_iso' },
+{ oid => '4418', descr => 'conversion for ISO-8859-5 to WIN1251',
+ conname => 'iso_8859_5_to_windows_1251', conforencoding => 'PG_ISO_8859_5',
+ contoencoding => 'PG_WIN1251', conproc => 'iso_to_win1251' },
+{ oid => '4419', descr => 'conversion for WIN1251 to ISO-8859-5',
+ conname => 'windows_1251_to_iso_8859_5', conforencoding => 'PG_WIN1251',
+ contoencoding => 'PG_ISO_8859_5', conproc => 'win1251_to_iso' },
+{ oid => '4420', descr => 'conversion for ISO-8859-5 to WIN866',
+ conname => 'iso_8859_5_to_windows_866', conforencoding => 'PG_ISO_8859_5',
+ contoencoding => 'PG_WIN866', conproc => 'iso_to_win866' },
+{ oid => '4421', descr => 'conversion for WIN866 to ISO-8859-5',
+ conname => 'windows_866_to_iso_8859_5', conforencoding => 'PG_WIN866',
+ contoencoding => 'PG_ISO_8859_5', conproc => 'win866_to_iso' },
+{ oid => '4422', descr => 'conversion for EUC_CN to MULE_INTERNAL',
+ conname => 'euc_cn_to_mic', conforencoding => 'PG_EUC_CN',
+ contoencoding => 'PG_MULE_INTERNAL', conproc => 'euc_cn_to_mic' },
+{ oid => '4423', descr => 'conversion for MULE_INTERNAL to EUC_CN',
+ conname => 'mic_to_euc_cn', conforencoding => 'PG_MULE_INTERNAL',
+ contoencoding => 'PG_EUC_CN', conproc => 'mic_to_euc_cn' },
+{ oid => '4424', descr => 'conversion for EUC_JP to SJIS',
+ conname => 'euc_jp_to_sjis', conforencoding => 'PG_EUC_JP',
+ contoencoding => 'PG_SJIS', conproc => 'euc_jp_to_sjis' },
+{ oid => '4425', descr => 'conversion for SJIS to EUC_JP',
+ conname => 'sjis_to_euc_jp', conforencoding => 'PG_SJIS',
+ contoencoding => 'PG_EUC_JP', conproc => 'sjis_to_euc_jp' },
+{ oid => '4426', descr => 'conversion for EUC_JP to MULE_INTERNAL',
+ conname => 'euc_jp_to_mic', conforencoding => 'PG_EUC_JP',
+ contoencoding => 'PG_MULE_INTERNAL', conproc => 'euc_jp_to_mic' },
+{ oid => '4427', descr => 'conversion for SJIS to MULE_INTERNAL',
+ conname => 'sjis_to_mic', conforencoding => 'PG_SJIS',
+ contoencoding => 'PG_MULE_INTERNAL', conproc => 'sjis_to_mic' },
+{ oid => '4428', descr => 'conversion for MULE_INTERNAL to EUC_JP',
+ conname => 'mic_to_euc_jp', conforencoding => 'PG_MULE_INTERNAL',
+ contoencoding => 'PG_EUC_JP', conproc => 'mic_to_euc_jp' },
+{ oid => '4429', descr => 'conversion for MULE_INTERNAL to SJIS',
+ conname => 'mic_to_sjis', conforencoding => 'PG_MULE_INTERNAL',
+ contoencoding => 'PG_SJIS', conproc => 'mic_to_sjis' },
+{ oid => '4430', descr => 'conversion for EUC_KR to MULE_INTERNAL',
+ conname => 'euc_kr_to_mic', conforencoding => 'PG_EUC_KR',
+ contoencoding => 'PG_MULE_INTERNAL', conproc => 'euc_kr_to_mic' },
+{ oid => '4431', descr => 'conversion for MULE_INTERNAL to EUC_KR',
+ conname => 'mic_to_euc_kr', conforencoding => 'PG_MULE_INTERNAL',
+ contoencoding => 'PG_EUC_KR', conproc => 'mic_to_euc_kr' },
+{ oid => '4432', descr => 'conversion for EUC_TW to BIG5',
+ conname => 'euc_tw_to_big5', conforencoding => 'PG_EUC_TW',
+ contoencoding => 'PG_BIG5', conproc => 'euc_tw_to_big5' },
+{ oid => '4433', descr => 'conversion for BIG5 to EUC_TW',
+ conname => 'big5_to_euc_tw', conforencoding => 'PG_BIG5',
+ contoencoding => 'PG_EUC_TW', conproc => 'big5_to_euc_tw' },
+{ oid => '4434', descr => 'conversion for EUC_TW to MULE_INTERNAL',
+ conname => 'euc_tw_to_mic', conforencoding => 'PG_EUC_TW',
+ contoencoding => 'PG_MULE_INTERNAL', conproc => 'euc_tw_to_mic' },
+{ oid => '4435', descr => 'conversion for BIG5 to MULE_INTERNAL',
+ conname => 'big5_to_mic', conforencoding => 'PG_BIG5',
+ contoencoding => 'PG_MULE_INTERNAL', conproc => 'big5_to_mic' },
+{ oid => '4436', descr => 'conversion for MULE_INTERNAL to EUC_TW',
+ conname => 'mic_to_euc_tw', conforencoding => 'PG_MULE_INTERNAL',
+ contoencoding => 'PG_EUC_TW', conproc => 'mic_to_euc_tw' },
+{ oid => '4437', descr => 'conversion for MULE_INTERNAL to BIG5',
+ conname => 'mic_to_big5', conforencoding => 'PG_MULE_INTERNAL',
+ contoencoding => 'PG_BIG5', conproc => 'mic_to_big5' },
+{ oid => '4438', descr => 'conversion for LATIN2 to MULE_INTERNAL',
+ conname => 'iso_8859_2_to_mic', conforencoding => 'PG_LATIN2',
+ contoencoding => 'PG_MULE_INTERNAL', conproc => 'latin2_to_mic' },
+{ oid => '4439', descr => 'conversion for MULE_INTERNAL to LATIN2',
+ conname => 'mic_to_iso_8859_2', conforencoding => 'PG_MULE_INTERNAL',
+ contoencoding => 'PG_LATIN2', conproc => 'mic_to_latin2' },
+{ oid => '4440', descr => 'conversion for WIN1250 to MULE_INTERNAL',
+ conname => 'windows_1250_to_mic', conforencoding => 'PG_WIN1250',
+ contoencoding => 'PG_MULE_INTERNAL', conproc => 'win1250_to_mic' },
+{ oid => '4441', descr => 'conversion for MULE_INTERNAL to WIN1250',
+ conname => 'mic_to_windows_1250', conforencoding => 'PG_MULE_INTERNAL',
+ contoencoding => 'PG_WIN1250', conproc => 'mic_to_win1250' },
+{ oid => '4442', descr => 'conversion for LATIN2 to WIN1250',
+ conname => 'iso_8859_2_to_windows_1250', conforencoding => 'PG_LATIN2',
+ contoencoding => 'PG_WIN1250', conproc => 'latin2_to_win1250' },
+{ oid => '4443', descr => 'conversion for WIN1250 to LATIN2',
+ conname => 'windows_1250_to_iso_8859_2', conforencoding => 'PG_WIN1250',
+ contoencoding => 'PG_LATIN2', conproc => 'win1250_to_latin2' },
+{ oid => '4444', descr => 'conversion for LATIN1 to MULE_INTERNAL',
+ conname => 'iso_8859_1_to_mic', conforencoding => 'PG_LATIN1',
+ contoencoding => 'PG_MULE_INTERNAL', conproc => 'latin1_to_mic' },
+{ oid => '4445', descr => 'conversion for MULE_INTERNAL to LATIN1',
+ conname => 'mic_to_iso_8859_1', conforencoding => 'PG_MULE_INTERNAL',
+ contoencoding => 'PG_LATIN1', conproc => 'mic_to_latin1' },
+{ oid => '4446', descr => 'conversion for LATIN3 to MULE_INTERNAL',
+ conname => 'iso_8859_3_to_mic', conforencoding => 'PG_LATIN3',
+ contoencoding => 'PG_MULE_INTERNAL', conproc => 'latin3_to_mic' },
+{ oid => '4447', descr => 'conversion for MULE_INTERNAL to LATIN3',
+ conname => 'mic_to_iso_8859_3', conforencoding => 'PG_MULE_INTERNAL',
+ contoencoding => 'PG_LATIN3', conproc => 'mic_to_latin3' },
+{ oid => '4448', descr => 'conversion for LATIN4 to MULE_INTERNAL',
+ conname => 'iso_8859_4_to_mic', conforencoding => 'PG_LATIN4',
+ contoencoding => 'PG_MULE_INTERNAL', conproc => 'latin4_to_mic' },
+{ oid => '4449', descr => 'conversion for MULE_INTERNAL to LATIN4',
+ conname => 'mic_to_iso_8859_4', conforencoding => 'PG_MULE_INTERNAL',
+ contoencoding => 'PG_LATIN4', conproc => 'mic_to_latin4' },
+{ oid => '4450', descr => 'conversion for SQL_ASCII to UTF8',
+ conname => 'ascii_to_utf8', conforencoding => 'PG_SQL_ASCII',
+ contoencoding => 'PG_UTF8', conproc => 'ascii_to_utf8' },
+{ oid => '4451', descr => 'conversion for UTF8 to SQL_ASCII',
+ conname => 'utf8_to_ascii', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_SQL_ASCII', conproc => 'utf8_to_ascii' },
+{ oid => '4452', descr => 'conversion for BIG5 to UTF8',
+ conname => 'big5_to_utf8', conforencoding => 'PG_BIG5',
+ contoencoding => 'PG_UTF8', conproc => 'big5_to_utf8' },
+{ oid => '4453', descr => 'conversion for UTF8 to BIG5',
+ conname => 'utf8_to_big5', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_BIG5', conproc => 'utf8_to_big5' },
+{ oid => '4454', descr => 'conversion for UTF8 to KOI8R',
+ conname => 'utf8_to_koi8_r', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_KOI8R', conproc => 'utf8_to_koi8r' },
+{ oid => '4455', descr => 'conversion for KOI8R to UTF8',
+ conname => 'koi8_r_to_utf8', conforencoding => 'PG_KOI8R',
+ contoencoding => 'PG_UTF8', conproc => 'koi8r_to_utf8' },
+{ oid => '4456', descr => 'conversion for UTF8 to KOI8U',
+ conname => 'utf8_to_koi8_u', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_KOI8U', conproc => 'utf8_to_koi8u' },
+{ oid => '4457', descr => 'conversion for KOI8U to UTF8',
+ conname => 'koi8_u_to_utf8', conforencoding => 'PG_KOI8U',
+ contoencoding => 'PG_UTF8', conproc => 'koi8u_to_utf8' },
+{ oid => '4458', descr => 'conversion for UTF8 to WIN866',
+ conname => 'utf8_to_windows_866', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_WIN866', conproc => 'utf8_to_win' },
+{ oid => '4459', descr => 'conversion for WIN866 to UTF8',
+ conname => 'windows_866_to_utf8', conforencoding => 'PG_WIN866',
+ contoencoding => 'PG_UTF8', conproc => 'win_to_utf8' },
+{ oid => '4460', descr => 'conversion for UTF8 to WIN874',
+ conname => 'utf8_to_windows_874', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_WIN874', conproc => 'utf8_to_win' },
+{ oid => '4461', descr => 'conversion for WIN874 to UTF8',
+ conname => 'windows_874_to_utf8', conforencoding => 'PG_WIN874',
+ contoencoding => 'PG_UTF8', conproc => 'win_to_utf8' },
+{ oid => '4462', descr => 'conversion for UTF8 to WIN1250',
+ conname => 'utf8_to_windows_1250', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_WIN1250', conproc => 'utf8_to_win' },
+{ oid => '4463', descr => 'conversion for WIN1250 to UTF8',
+ conname => 'windows_1250_to_utf8', conforencoding => 'PG_WIN1250',
+ contoencoding => 'PG_UTF8', conproc => 'win_to_utf8' },
+{ oid => '4464', descr => 'conversion for UTF8 to WIN1251',
+ conname => 'utf8_to_windows_1251', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_WIN1251', conproc => 'utf8_to_win' },
+{ oid => '4465', descr => 'conversion for WIN1251 to UTF8',
+ conname => 'windows_1251_to_utf8', conforencoding => 'PG_WIN1251',
+ contoencoding => 'PG_UTF8', conproc => 'win_to_utf8' },
+{ oid => '4466', descr => 'conversion for UTF8 to WIN1252',
+ conname => 'utf8_to_windows_1252', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_WIN1252', conproc => 'utf8_to_win' },
+{ oid => '4467', descr => 'conversion for WIN1252 to UTF8',
+ conname => 'windows_1252_to_utf8', conforencoding => 'PG_WIN1252',
+ contoencoding => 'PG_UTF8', conproc => 'win_to_utf8' },
+{ oid => '4468', descr => 'conversion for UTF8 to WIN1253',
+ conname => 'utf8_to_windows_1253', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_WIN1253', conproc => 'utf8_to_win' },
+{ oid => '4469', descr => 'conversion for WIN1253 to UTF8',
+ conname => 'windows_1253_to_utf8', conforencoding => 'PG_WIN1253',
+ contoencoding => 'PG_UTF8', conproc => 'win_to_utf8' },
+{ oid => '4470', descr => 'conversion for UTF8 to WIN1254',
+ conname => 'utf8_to_windows_1254', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_WIN1254', conproc => 'utf8_to_win' },
+{ oid => '4471', descr => 'conversion for WIN1254 to UTF8',
+ conname => 'windows_1254_to_utf8', conforencoding => 'PG_WIN1254',
+ contoencoding => 'PG_UTF8', conproc => 'win_to_utf8' },
+{ oid => '4472', descr => 'conversion for UTF8 to WIN1255',
+ conname => 'utf8_to_windows_1255', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_WIN1255', conproc => 'utf8_to_win' },
+{ oid => '4473', descr => 'conversion for WIN1255 to UTF8',
+ conname => 'windows_1255_to_utf8', conforencoding => 'PG_WIN1255',
+ contoencoding => 'PG_UTF8', conproc => 'win_to_utf8' },
+{ oid => '4474', descr => 'conversion for UTF8 to WIN1256',
+ conname => 'utf8_to_windows_1256', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_WIN1256', conproc => 'utf8_to_win' },
+{ oid => '4475', descr => 'conversion for WIN1256 to UTF8',
+ conname => 'windows_1256_to_utf8', conforencoding => 'PG_WIN1256',
+ contoencoding => 'PG_UTF8', conproc => 'win_to_utf8' },
+{ oid => '4476', descr => 'conversion for UTF8 to WIN1257',
+ conname => 'utf8_to_windows_1257', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_WIN1257', conproc => 'utf8_to_win' },
+{ oid => '4477', descr => 'conversion for WIN1257 to UTF8',
+ conname => 'windows_1257_to_utf8', conforencoding => 'PG_WIN1257',
+ contoencoding => 'PG_UTF8', conproc => 'win_to_utf8' },
+{ oid => '4478', descr => 'conversion for UTF8 to WIN1258',
+ conname => 'utf8_to_windows_1258', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_WIN1258', conproc => 'utf8_to_win' },
+{ oid => '4479', descr => 'conversion for WIN1258 to UTF8',
+ conname => 'windows_1258_to_utf8', conforencoding => 'PG_WIN1258',
+ contoencoding => 'PG_UTF8', conproc => 'win_to_utf8' },
+{ oid => '4480', descr => 'conversion for EUC_CN to UTF8',
+ conname => 'euc_cn_to_utf8', conforencoding => 'PG_EUC_CN',
+ contoencoding => 'PG_UTF8', conproc => 'euc_cn_to_utf8' },
+{ oid => '4481', descr => 'conversion for UTF8 to EUC_CN',
+ conname => 'utf8_to_euc_cn', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_EUC_CN', conproc => 'utf8_to_euc_cn' },
+{ oid => '4482', descr => 'conversion for EUC_JP to UTF8',
+ conname => 'euc_jp_to_utf8', conforencoding => 'PG_EUC_JP',
+ contoencoding => 'PG_UTF8', conproc => 'euc_jp_to_utf8' },
+{ oid => '4483', descr => 'conversion for UTF8 to EUC_JP',
+ conname => 'utf8_to_euc_jp', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_EUC_JP', conproc => 'utf8_to_euc_jp' },
+{ oid => '4484', descr => 'conversion for EUC_KR to UTF8',
+ conname => 'euc_kr_to_utf8', conforencoding => 'PG_EUC_KR',
+ contoencoding => 'PG_UTF8', conproc => 'euc_kr_to_utf8' },
+{ oid => '4485', descr => 'conversion for UTF8 to EUC_KR',
+ conname => 'utf8_to_euc_kr', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_EUC_KR', conproc => 'utf8_to_euc_kr' },
+{ oid => '4486', descr => 'conversion for EUC_TW to UTF8',
+ conname => 'euc_tw_to_utf8', conforencoding => 'PG_EUC_TW',
+ contoencoding => 'PG_UTF8', conproc => 'euc_tw_to_utf8' },
+{ oid => '4487', descr => 'conversion for UTF8 to EUC_TW',
+ conname => 'utf8_to_euc_tw', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_EUC_TW', conproc => 'utf8_to_euc_tw' },
+{ oid => '4488', descr => 'conversion for GB18030 to UTF8',
+ conname => 'gb18030_to_utf8', conforencoding => 'PG_GB18030',
+ contoencoding => 'PG_UTF8', conproc => 'gb18030_to_utf8' },
+{ oid => '4489', descr => 'conversion for UTF8 to GB18030',
+ conname => 'utf8_to_gb18030', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_GB18030', conproc => 'utf8_to_gb18030' },
+{ oid => '4490', descr => 'conversion for GBK to UTF8',
+ conname => 'gbk_to_utf8', conforencoding => 'PG_GBK',
+ contoencoding => 'PG_UTF8', conproc => 'gbk_to_utf8' },
+{ oid => '4491', descr => 'conversion for UTF8 to GBK',
+ conname => 'utf8_to_gbk', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_GBK', conproc => 'utf8_to_gbk' },
+{ oid => '4492', descr => 'conversion for UTF8 to LATIN2',
+ conname => 'utf8_to_iso_8859_2', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_LATIN2', conproc => 'utf8_to_iso8859' },
+{ oid => '4493', descr => 'conversion for LATIN2 to UTF8',
+ conname => 'iso_8859_2_to_utf8', conforencoding => 'PG_LATIN2',
+ contoencoding => 'PG_UTF8', conproc => 'iso8859_to_utf8' },
+{ oid => '4494', descr => 'conversion for UTF8 to LATIN3',
+ conname => 'utf8_to_iso_8859_3', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_LATIN3', conproc => 'utf8_to_iso8859' },
+{ oid => '4495', descr => 'conversion for LATIN3 to UTF8',
+ conname => 'iso_8859_3_to_utf8', conforencoding => 'PG_LATIN3',
+ contoencoding => 'PG_UTF8', conproc => 'iso8859_to_utf8' },
+{ oid => '4496', descr => 'conversion for UTF8 to LATIN4',
+ conname => 'utf8_to_iso_8859_4', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_LATIN4', conproc => 'utf8_to_iso8859' },
+{ oid => '4497', descr => 'conversion for LATIN4 to UTF8',
+ conname => 'iso_8859_4_to_utf8', conforencoding => 'PG_LATIN4',
+ contoencoding => 'PG_UTF8', conproc => 'iso8859_to_utf8' },
+{ oid => '4498', descr => 'conversion for UTF8 to LATIN5',
+ conname => 'utf8_to_iso_8859_9', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_LATIN5', conproc => 'utf8_to_iso8859' },
+{ oid => '4499', descr => 'conversion for LATIN5 to UTF8',
+ conname => 'iso_8859_9_to_utf8', conforencoding => 'PG_LATIN5',
+ contoencoding => 'PG_UTF8', conproc => 'iso8859_to_utf8' },
+{ oid => '4500', descr => 'conversion for UTF8 to LATIN6',
+ conname => 'utf8_to_iso_8859_10', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_LATIN6', conproc => 'utf8_to_iso8859' },
+{ oid => '4501', descr => 'conversion for LATIN6 to UTF8',
+ conname => 'iso_8859_10_to_utf8', conforencoding => 'PG_LATIN6',
+ contoencoding => 'PG_UTF8', conproc => 'iso8859_to_utf8' },
+{ oid => '4502', descr => 'conversion for UTF8 to LATIN7',
+ conname => 'utf8_to_iso_8859_13', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_LATIN7', conproc => 'utf8_to_iso8859' },
+{ oid => '4503', descr => 'conversion for LATIN7 to UTF8',
+ conname => 'iso_8859_13_to_utf8', conforencoding => 'PG_LATIN7',
+ contoencoding => 'PG_UTF8', conproc => 'iso8859_to_utf8' },
+{ oid => '4504', descr => 'conversion for UTF8 to LATIN8',
+ conname => 'utf8_to_iso_8859_14', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_LATIN8', conproc => 'utf8_to_iso8859' },
+{ oid => '4505', descr => 'conversion for LATIN8 to UTF8',
+ conname => 'iso_8859_14_to_utf8', conforencoding => 'PG_LATIN8',
+ contoencoding => 'PG_UTF8', conproc => 'iso8859_to_utf8' },
+{ oid => '4506', descr => 'conversion for UTF8 to LATIN9',
+ conname => 'utf8_to_iso_8859_15', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_LATIN9', conproc => 'utf8_to_iso8859' },
+{ oid => '4507', descr => 'conversion for LATIN9 to UTF8',
+ conname => 'iso_8859_15_to_utf8', conforencoding => 'PG_LATIN9',
+ contoencoding => 'PG_UTF8', conproc => 'iso8859_to_utf8' },
+{ oid => '4508', descr => 'conversion for UTF8 to LATIN10',
+ conname => 'utf8_to_iso_8859_16', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_LATIN10', conproc => 'utf8_to_iso8859' },
+{ oid => '4509', descr => 'conversion for LATIN10 to UTF8',
+ conname => 'iso_8859_16_to_utf8', conforencoding => 'PG_LATIN10',
+ contoencoding => 'PG_UTF8', conproc => 'iso8859_to_utf8' },
+{ oid => '4510', descr => 'conversion for UTF8 to ISO-8859-5',
+ conname => 'utf8_to_iso_8859_5', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_ISO_8859_5', conproc => 'utf8_to_iso8859' },
+{ oid => '4511', descr => 'conversion for ISO-8859-5 to UTF8',
+ conname => 'iso_8859_5_to_utf8', conforencoding => 'PG_ISO_8859_5',
+ contoencoding => 'PG_UTF8', conproc => 'iso8859_to_utf8' },
+{ oid => '4512', descr => 'conversion for UTF8 to ISO-8859-6',
+ conname => 'utf8_to_iso_8859_6', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_ISO_8859_6', conproc => 'utf8_to_iso8859' },
+{ oid => '4513', descr => 'conversion for ISO-8859-6 to UTF8',
+ conname => 'iso_8859_6_to_utf8', conforencoding => 'PG_ISO_8859_6',
+ contoencoding => 'PG_UTF8', conproc => 'iso8859_to_utf8' },
+{ oid => '4514', descr => 'conversion for UTF8 to ISO-8859-7',
+ conname => 'utf8_to_iso_8859_7', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_ISO_8859_7', conproc => 'utf8_to_iso8859' },
+{ oid => '4515', descr => 'conversion for ISO-8859-7 to UTF8',
+ conname => 'iso_8859_7_to_utf8', conforencoding => 'PG_ISO_8859_7',
+ contoencoding => 'PG_UTF8', conproc => 'iso8859_to_utf8' },
+{ oid => '4516', descr => 'conversion for UTF8 to ISO-8859-8',
+ conname => 'utf8_to_iso_8859_8', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_ISO_8859_8', conproc => 'utf8_to_iso8859' },
+{ oid => '4517', descr => 'conversion for ISO-8859-8 to UTF8',
+ conname => 'iso_8859_8_to_utf8', conforencoding => 'PG_ISO_8859_8',
+ contoencoding => 'PG_UTF8', conproc => 'iso8859_to_utf8' },
+{ oid => '4518', descr => 'conversion for LATIN1 to UTF8',
+ conname => 'iso_8859_1_to_utf8', conforencoding => 'PG_LATIN1',
+ contoencoding => 'PG_UTF8', conproc => 'iso8859_1_to_utf8' },
+{ oid => '4519', descr => 'conversion for UTF8 to LATIN1',
+ conname => 'utf8_to_iso_8859_1', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_LATIN1', conproc => 'utf8_to_iso8859_1' },
+{ oid => '4520', descr => 'conversion for JOHAB to UTF8',
+ conname => 'johab_to_utf8', conforencoding => 'PG_JOHAB',
+ contoencoding => 'PG_UTF8', conproc => 'johab_to_utf8' },
+{ oid => '4521', descr => 'conversion for UTF8 to JOHAB',
+ conname => 'utf8_to_johab', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_JOHAB', conproc => 'utf8_to_johab' },
+{ oid => '4522', descr => 'conversion for SJIS to UTF8',
+ conname => 'sjis_to_utf8', conforencoding => 'PG_SJIS',
+ contoencoding => 'PG_UTF8', conproc => 'sjis_to_utf8' },
+{ oid => '4523', descr => 'conversion for UTF8 to SJIS',
+ conname => 'utf8_to_sjis', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_SJIS', conproc => 'utf8_to_sjis' },
+{ oid => '4524', descr => 'conversion for UHC to UTF8',
+ conname => 'uhc_to_utf8', conforencoding => 'PG_UHC',
+ contoencoding => 'PG_UTF8', conproc => 'uhc_to_utf8' },
+{ oid => '4525', descr => 'conversion for UTF8 to UHC',
+ conname => 'utf8_to_uhc', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_UHC', conproc => 'utf8_to_uhc' },
+{ oid => '4526', descr => 'conversion for EUC_JIS_2004 to UTF8',
+ conname => 'euc_jis_2004_to_utf8', conforencoding => 'PG_EUC_JIS_2004',
+ contoencoding => 'PG_UTF8', conproc => 'euc_jis_2004_to_utf8' },
+{ oid => '4527', descr => 'conversion for UTF8 to EUC_JIS_2004',
+ conname => 'utf8_to_euc_jis_2004', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_EUC_JIS_2004', conproc => 'utf8_to_euc_jis_2004' },
+{ oid => '4528', descr => 'conversion for SHIFT_JIS_2004 to UTF8',
+ conname => 'shift_jis_2004_to_utf8', conforencoding => 'PG_SHIFT_JIS_2004',
+ contoencoding => 'PG_UTF8', conproc => 'shift_jis_2004_to_utf8' },
+{ oid => '4529', descr => 'conversion for UTF8 to SHIFT_JIS_2004',
+ conname => 'utf8_to_shift_jis_2004', conforencoding => 'PG_UTF8',
+ contoencoding => 'PG_SHIFT_JIS_2004', conproc => 'utf8_to_shift_jis_2004' },
+{ oid => '4530', descr => 'conversion for EUC_JIS_2004 to SHIFT_JIS_2004',
+ conname => 'euc_jis_2004_to_shift_jis_2004',
+ conforencoding => 'PG_EUC_JIS_2004', contoencoding => 'PG_SHIFT_JIS_2004',
+ conproc => 'euc_jis_2004_to_shift_jis_2004' },
+{ oid => '4531', descr => 'conversion for SHIFT_JIS_2004 to EUC_JIS_2004',
+ conname => 'shift_jis_2004_to_euc_jis_2004',
+ conforencoding => 'PG_SHIFT_JIS_2004', contoencoding => 'PG_EUC_JIS_2004',
+ conproc => 'shift_jis_2004_to_euc_jis_2004' },
+
+]
* pg_conversion.h
* definition of the "conversion" system catalog (pg_conversion)
*
- *
* Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
#include "catalog/objectaddress.h"
-/* ----------------------------------------------------------------
- * pg_conversion definition.
- *
- * cpp turns this into typedef struct FormData_pg_namespace
- *
- * conname name of the conversion
- * connamespace name space which the conversion belongs to
- * conowner owner of the conversion
- * conforencoding FOR encoding id
- * contoencoding TO encoding id
- * conproc OID of the conversion proc
- * condefault true if this is a default conversion
- * ----------------------------------------------------------------
+/* ----------------
+ * pg_conversion definition. cpp turns this into
+ * typedef struct FormData_pg_conversion
+ * ----------------
*/
CATALOG(pg_conversion,2607,ConversionRelationId)
{
- Oid oid; /* oid */
+ /* oid */
+ Oid oid;
+
+ /* name of the conversion */
NameData conname;
- Oid connamespace;
- Oid conowner;
- int32 conforencoding;
- int32 contoencoding;
- regproc conproc;
- bool condefault;
+
+ /* namespace that the conversion belongs to */
+ Oid connamespace BKI_DEFAULT(PGNSP);
+
+ /* owner of the conversion */
+ Oid conowner BKI_DEFAULT(PGUID);
+
+ /* FOR encoding id */
+ int32 conforencoding BKI_LOOKUP(encoding);
+
+ /* TO encoding id */
+ int32 contoencoding BKI_LOOKUP(encoding);
+
+ /* OID of the conversion proc */
+ regproc conproc BKI_LOOKUP(pg_proc);
+
+ /* true if this is a default conversion */
+ bool condefault BKI_DEFAULT(t);
} FormData_pg_conversion;
/* ----------------
# Try to follow the style of existing functions' comments.
# Some recommended conventions:
-
+#
# "I/O" for typinput, typoutput, typreceive, typsend functions
# "I/O typmod" for typmodin, typmodout functions
# "aggregate transition function" for aggtransfn functions, unless
proparallel => 'u', prorettype => 'void', proargtypes => 'oid text text',
prosrc => 'binary_upgrade_set_missing_value' },
+# conversion functions
+{ oid => '4300',
+ descr => 'internal conversion function for SQL_ASCII to MULE_INTERNAL',
+ proname => 'ascii_to_mic', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'ascii_to_mic',
+ probin => '$libdir/ascii_and_mic' },
+{ oid => '4301',
+ descr => 'internal conversion function for MULE_INTERNAL to SQL_ASCII',
+ proname => 'mic_to_ascii', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_ascii',
+ probin => '$libdir/ascii_and_mic' },
+{ oid => '4302',
+ descr => 'internal conversion function for KOI8R to MULE_INTERNAL',
+ proname => 'koi8r_to_mic', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'koi8r_to_mic',
+ probin => '$libdir/cyrillic_and_mic' },
+{ oid => '4303',
+ descr => 'internal conversion function for MULE_INTERNAL to KOI8R',
+ proname => 'mic_to_koi8r', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_koi8r',
+ probin => '$libdir/cyrillic_and_mic' },
+{ oid => '4304',
+ descr => 'internal conversion function for ISO-8859-5 to MULE_INTERNAL',
+ proname => 'iso_to_mic', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'iso_to_mic',
+ probin => '$libdir/cyrillic_and_mic' },
+{ oid => '4305',
+ descr => 'internal conversion function for MULE_INTERNAL to ISO-8859-5',
+ proname => 'mic_to_iso', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_iso',
+ probin => '$libdir/cyrillic_and_mic' },
+{ oid => '4306',
+ descr => 'internal conversion function for WIN1251 to MULE_INTERNAL',
+ proname => 'win1251_to_mic', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'win1251_to_mic',
+ probin => '$libdir/cyrillic_and_mic' },
+{ oid => '4307',
+ descr => 'internal conversion function for MULE_INTERNAL to WIN1251',
+ proname => 'mic_to_win1251', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_win1251',
+ probin => '$libdir/cyrillic_and_mic' },
+{ oid => '4308',
+ descr => 'internal conversion function for WIN866 to MULE_INTERNAL',
+ proname => 'win866_to_mic', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'win866_to_mic',
+ probin => '$libdir/cyrillic_and_mic' },
+{ oid => '4309',
+ descr => 'internal conversion function for MULE_INTERNAL to WIN866',
+ proname => 'mic_to_win866', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_win866',
+ probin => '$libdir/cyrillic_and_mic' },
+{ oid => '4310', descr => 'internal conversion function for KOI8R to WIN1251',
+ proname => 'koi8r_to_win1251', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4',
+ prosrc => 'koi8r_to_win1251', probin => '$libdir/cyrillic_and_mic' },
+{ oid => '4311', descr => 'internal conversion function for WIN1251 to KOI8R',
+ proname => 'win1251_to_koi8r', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4',
+ prosrc => 'win1251_to_koi8r', probin => '$libdir/cyrillic_and_mic' },
+{ oid => '4312', descr => 'internal conversion function for KOI8R to WIN866',
+ proname => 'koi8r_to_win866', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'koi8r_to_win866',
+ probin => '$libdir/cyrillic_and_mic' },
+{ oid => '4313', descr => 'internal conversion function for WIN866 to KOI8R',
+ proname => 'win866_to_koi8r', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'win866_to_koi8r',
+ probin => '$libdir/cyrillic_and_mic' },
+{ oid => '4314',
+ descr => 'internal conversion function for WIN866 to WIN1251',
+ proname => 'win866_to_win1251', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4',
+ prosrc => 'win866_to_win1251', probin => '$libdir/cyrillic_and_mic' },
+{ oid => '4315',
+ descr => 'internal conversion function for WIN1251 to WIN866',
+ proname => 'win1251_to_win866', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4',
+ prosrc => 'win1251_to_win866', probin => '$libdir/cyrillic_and_mic' },
+{ oid => '4316',
+ descr => 'internal conversion function for ISO-8859-5 to KOI8R',
+ proname => 'iso_to_koi8r', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'iso_to_koi8r',
+ probin => '$libdir/cyrillic_and_mic' },
+{ oid => '4317',
+ descr => 'internal conversion function for KOI8R to ISO-8859-5',
+ proname => 'koi8r_to_iso', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'koi8r_to_iso',
+ probin => '$libdir/cyrillic_and_mic' },
+{ oid => '4318',
+ descr => 'internal conversion function for ISO-8859-5 to WIN1251',
+ proname => 'iso_to_win1251', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'iso_to_win1251',
+ probin => '$libdir/cyrillic_and_mic' },
+{ oid => '4319',
+ descr => 'internal conversion function for WIN1251 to ISO-8859-5',
+ proname => 'win1251_to_iso', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'win1251_to_iso',
+ probin => '$libdir/cyrillic_and_mic' },
+{ oid => '4320',
+ descr => 'internal conversion function for ISO-8859-5 to WIN866',
+ proname => 'iso_to_win866', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'iso_to_win866',
+ probin => '$libdir/cyrillic_and_mic' },
+{ oid => '4321',
+ descr => 'internal conversion function for WIN866 to ISO-8859-5',
+ proname => 'win866_to_iso', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'win866_to_iso',
+ probin => '$libdir/cyrillic_and_mic' },
+{ oid => '4322',
+ descr => 'internal conversion function for EUC_CN to MULE_INTERNAL',
+ proname => 'euc_cn_to_mic', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'euc_cn_to_mic',
+ probin => '$libdir/euc_cn_and_mic' },
+{ oid => '4323',
+ descr => 'internal conversion function for MULE_INTERNAL to EUC_CN',
+ proname => 'mic_to_euc_cn', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_euc_cn',
+ probin => '$libdir/euc_cn_and_mic' },
+{ oid => '4324', descr => 'internal conversion function for EUC_JP to SJIS',
+ proname => 'euc_jp_to_sjis', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'euc_jp_to_sjis',
+ probin => '$libdir/euc_jp_and_sjis' },
+{ oid => '4325', descr => 'internal conversion function for SJIS to EUC_JP',
+ proname => 'sjis_to_euc_jp', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'sjis_to_euc_jp',
+ probin => '$libdir/euc_jp_and_sjis' },
+{ oid => '4326',
+ descr => 'internal conversion function for EUC_JP to MULE_INTERNAL',
+ proname => 'euc_jp_to_mic', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'euc_jp_to_mic',
+ probin => '$libdir/euc_jp_and_sjis' },
+{ oid => '4327',
+ descr => 'internal conversion function for SJIS to MULE_INTERNAL',
+ proname => 'sjis_to_mic', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'sjis_to_mic',
+ probin => '$libdir/euc_jp_and_sjis' },
+{ oid => '4328',
+ descr => 'internal conversion function for MULE_INTERNAL to EUC_JP',
+ proname => 'mic_to_euc_jp', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_euc_jp',
+ probin => '$libdir/euc_jp_and_sjis' },
+{ oid => '4329',
+ descr => 'internal conversion function for MULE_INTERNAL to SJIS',
+ proname => 'mic_to_sjis', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_sjis',
+ probin => '$libdir/euc_jp_and_sjis' },
+{ oid => '4330',
+ descr => 'internal conversion function for EUC_KR to MULE_INTERNAL',
+ proname => 'euc_kr_to_mic', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'euc_kr_to_mic',
+ probin => '$libdir/euc_kr_and_mic' },
+{ oid => '4331',
+ descr => 'internal conversion function for MULE_INTERNAL to EUC_KR',
+ proname => 'mic_to_euc_kr', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_euc_kr',
+ probin => '$libdir/euc_kr_and_mic' },
+{ oid => '4332', descr => 'internal conversion function for EUC_TW to BIG5',
+ proname => 'euc_tw_to_big5', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'euc_tw_to_big5',
+ probin => '$libdir/euc_tw_and_big5' },
+{ oid => '4333', descr => 'internal conversion function for BIG5 to EUC_TW',
+ proname => 'big5_to_euc_tw', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'big5_to_euc_tw',
+ probin => '$libdir/euc_tw_and_big5' },
+{ oid => '4334',
+ descr => 'internal conversion function for EUC_TW to MULE_INTERNAL',
+ proname => 'euc_tw_to_mic', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'euc_tw_to_mic',
+ probin => '$libdir/euc_tw_and_big5' },
+{ oid => '4335',
+ descr => 'internal conversion function for BIG5 to MULE_INTERNAL',
+ proname => 'big5_to_mic', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'big5_to_mic',
+ probin => '$libdir/euc_tw_and_big5' },
+{ oid => '4336',
+ descr => 'internal conversion function for MULE_INTERNAL to EUC_TW',
+ proname => 'mic_to_euc_tw', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_euc_tw',
+ probin => '$libdir/euc_tw_and_big5' },
+{ oid => '4337',
+ descr => 'internal conversion function for MULE_INTERNAL to BIG5',
+ proname => 'mic_to_big5', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_big5',
+ probin => '$libdir/euc_tw_and_big5' },
+{ oid => '4338',
+ descr => 'internal conversion function for LATIN2 to MULE_INTERNAL',
+ proname => 'latin2_to_mic', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'latin2_to_mic',
+ probin => '$libdir/latin2_and_win1250' },
+{ oid => '4339',
+ descr => 'internal conversion function for MULE_INTERNAL to LATIN2',
+ proname => 'mic_to_latin2', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_latin2',
+ probin => '$libdir/latin2_and_win1250' },
+{ oid => '4340',
+ descr => 'internal conversion function for WIN1250 to MULE_INTERNAL',
+ proname => 'win1250_to_mic', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'win1250_to_mic',
+ probin => '$libdir/latin2_and_win1250' },
+{ oid => '4341',
+ descr => 'internal conversion function for MULE_INTERNAL to WIN1250',
+ proname => 'mic_to_win1250', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_win1250',
+ probin => '$libdir/latin2_and_win1250' },
+{ oid => '4342',
+ descr => 'internal conversion function for LATIN2 to WIN1250',
+ proname => 'latin2_to_win1250', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4',
+ prosrc => 'latin2_to_win1250', probin => '$libdir/latin2_and_win1250' },
+{ oid => '4343',
+ descr => 'internal conversion function for WIN1250 to LATIN2',
+ proname => 'win1250_to_latin2', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4',
+ prosrc => 'win1250_to_latin2', probin => '$libdir/latin2_and_win1250' },
+{ oid => '4344',
+ descr => 'internal conversion function for LATIN1 to MULE_INTERNAL',
+ proname => 'latin1_to_mic', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'latin1_to_mic',
+ probin => '$libdir/latin_and_mic' },
+{ oid => '4345',
+ descr => 'internal conversion function for MULE_INTERNAL to LATIN1',
+ proname => 'mic_to_latin1', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_latin1',
+ probin => '$libdir/latin_and_mic' },
+{ oid => '4346',
+ descr => 'internal conversion function for LATIN3 to MULE_INTERNAL',
+ proname => 'latin3_to_mic', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'latin3_to_mic',
+ probin => '$libdir/latin_and_mic' },
+{ oid => '4347',
+ descr => 'internal conversion function for MULE_INTERNAL to LATIN3',
+ proname => 'mic_to_latin3', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_latin3',
+ probin => '$libdir/latin_and_mic' },
+{ oid => '4348',
+ descr => 'internal conversion function for LATIN4 to MULE_INTERNAL',
+ proname => 'latin4_to_mic', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'latin4_to_mic',
+ probin => '$libdir/latin_and_mic' },
+{ oid => '4349',
+ descr => 'internal conversion function for MULE_INTERNAL to LATIN4',
+ proname => 'mic_to_latin4', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_latin4',
+ probin => '$libdir/latin_and_mic' },
+{ oid => '4350',
+ descr => 'internal conversion function for SQL_ASCII to UTF8',
+ proname => 'ascii_to_utf8', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'ascii_to_utf8',
+ probin => '$libdir/utf8_and_ascii' },
+{ oid => '4351',
+ descr => 'internal conversion function for UTF8 to SQL_ASCII',
+ proname => 'utf8_to_ascii', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_ascii',
+ probin => '$libdir/utf8_and_ascii' },
+{ oid => '4352', descr => 'internal conversion function for BIG5 to UTF8',
+ proname => 'big5_to_utf8', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'big5_to_utf8',
+ probin => '$libdir/utf8_and_big5' },
+{ oid => '4353', descr => 'internal conversion function for UTF8 to BIG5',
+ proname => 'utf8_to_big5', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_big5',
+ probin => '$libdir/utf8_and_big5' },
+{ oid => '4354', descr => 'internal conversion function for UTF8 to KOI8R',
+ proname => 'utf8_to_koi8r', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_koi8r',
+ probin => '$libdir/utf8_and_cyrillic' },
+{ oid => '4355', descr => 'internal conversion function for KOI8R to UTF8',
+ proname => 'koi8r_to_utf8', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'koi8r_to_utf8',
+ probin => '$libdir/utf8_and_cyrillic' },
+{ oid => '4356', descr => 'internal conversion function for UTF8 to KOI8U',
+ proname => 'utf8_to_koi8u', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_koi8u',
+ probin => '$libdir/utf8_and_cyrillic' },
+{ oid => '4357', descr => 'internal conversion function for KOI8U to UTF8',
+ proname => 'koi8u_to_utf8', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'koi8u_to_utf8',
+ probin => '$libdir/utf8_and_cyrillic' },
+{ oid => '4358', descr => 'internal conversion function for UTF8 to WIN',
+ proname => 'utf8_to_win', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_win',
+ probin => '$libdir/utf8_and_win' },
+{ oid => '4359', descr => 'internal conversion function for WIN to UTF8',
+ proname => 'win_to_utf8', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'win_to_utf8',
+ probin => '$libdir/utf8_and_win' },
+{ oid => '4360', descr => 'internal conversion function for EUC_CN to UTF8',
+ proname => 'euc_cn_to_utf8', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'euc_cn_to_utf8',
+ probin => '$libdir/utf8_and_euc_cn' },
+{ oid => '4361', descr => 'internal conversion function for UTF8 to EUC_CN',
+ proname => 'utf8_to_euc_cn', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_euc_cn',
+ probin => '$libdir/utf8_and_euc_cn' },
+{ oid => '4362', descr => 'internal conversion function for EUC_JP to UTF8',
+ proname => 'euc_jp_to_utf8', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'euc_jp_to_utf8',
+ probin => '$libdir/utf8_and_euc_jp' },
+{ oid => '4363', descr => 'internal conversion function for UTF8 to EUC_JP',
+ proname => 'utf8_to_euc_jp', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_euc_jp',
+ probin => '$libdir/utf8_and_euc_jp' },
+{ oid => '4364', descr => 'internal conversion function for EUC_KR to UTF8',
+ proname => 'euc_kr_to_utf8', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'euc_kr_to_utf8',
+ probin => '$libdir/utf8_and_euc_kr' },
+{ oid => '4365', descr => 'internal conversion function for UTF8 to EUC_KR',
+ proname => 'utf8_to_euc_kr', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_euc_kr',
+ probin => '$libdir/utf8_and_euc_kr' },
+{ oid => '4366', descr => 'internal conversion function for EUC_TW to UTF8',
+ proname => 'euc_tw_to_utf8', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'euc_tw_to_utf8',
+ probin => '$libdir/utf8_and_euc_tw' },
+{ oid => '4367', descr => 'internal conversion function for UTF8 to EUC_TW',
+ proname => 'utf8_to_euc_tw', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_euc_tw',
+ probin => '$libdir/utf8_and_euc_tw' },
+{ oid => '4368', descr => 'internal conversion function for GB18030 to UTF8',
+ proname => 'gb18030_to_utf8', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'gb18030_to_utf8',
+ probin => '$libdir/utf8_and_gb18030' },
+{ oid => '4369', descr => 'internal conversion function for UTF8 to GB18030',
+ proname => 'utf8_to_gb18030', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_gb18030',
+ probin => '$libdir/utf8_and_gb18030' },
+{ oid => '4370', descr => 'internal conversion function for GBK to UTF8',
+ proname => 'gbk_to_utf8', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'gbk_to_utf8',
+ probin => '$libdir/utf8_and_gbk' },
+{ oid => '4371', descr => 'internal conversion function for UTF8 to GBK',
+ proname => 'utf8_to_gbk', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_gbk',
+ probin => '$libdir/utf8_and_gbk' },
+{ oid => '4372',
+ descr => 'internal conversion function for UTF8 to ISO-8859 2-16',
+ proname => 'utf8_to_iso8859', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_iso8859',
+ probin => '$libdir/utf8_and_iso8859' },
+{ oid => '4373',
+ descr => 'internal conversion function for ISO-8859 2-16 to UTF8',
+ proname => 'iso8859_to_utf8', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'iso8859_to_utf8',
+ probin => '$libdir/utf8_and_iso8859' },
+{ oid => '4374', descr => 'internal conversion function for LATIN1 to UTF8',
+ proname => 'iso8859_1_to_utf8', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4',
+ prosrc => 'iso8859_1_to_utf8', probin => '$libdir/utf8_and_iso8859_1' },
+{ oid => '4375', descr => 'internal conversion function for UTF8 to LATIN1',
+ proname => 'utf8_to_iso8859_1', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4',
+ prosrc => 'utf8_to_iso8859_1', probin => '$libdir/utf8_and_iso8859_1' },
+{ oid => '4376', descr => 'internal conversion function for JOHAB to UTF8',
+ proname => 'johab_to_utf8', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'johab_to_utf8',
+ probin => '$libdir/utf8_and_johab' },
+{ oid => '4377', descr => 'internal conversion function for UTF8 to JOHAB',
+ proname => 'utf8_to_johab', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_johab',
+ probin => '$libdir/utf8_and_johab' },
+{ oid => '4378', descr => 'internal conversion function for SJIS to UTF8',
+ proname => 'sjis_to_utf8', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'sjis_to_utf8',
+ probin => '$libdir/utf8_and_sjis' },
+{ oid => '4379', descr => 'internal conversion function for UTF8 to SJIS',
+ proname => 'utf8_to_sjis', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_sjis',
+ probin => '$libdir/utf8_and_sjis' },
+{ oid => '4380', descr => 'internal conversion function for UHC to UTF8',
+ proname => 'uhc_to_utf8', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'uhc_to_utf8',
+ probin => '$libdir/utf8_and_uhc' },
+{ oid => '4381', descr => 'internal conversion function for UTF8 to UHC',
+ proname => 'utf8_to_uhc', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_uhc',
+ probin => '$libdir/utf8_and_uhc' },
+{ oid => '4382',
+ descr => 'internal conversion function for EUC_JIS_2004 to UTF8',
+ proname => 'euc_jis_2004_to_utf8', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4',
+ prosrc => 'euc_jis_2004_to_utf8', probin => '$libdir/utf8_and_euc2004' },
+{ oid => '4383',
+ descr => 'internal conversion function for UTF8 to EUC_JIS_2004',
+ proname => 'utf8_to_euc_jis_2004', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4',
+ prosrc => 'utf8_to_euc_jis_2004', probin => '$libdir/utf8_and_euc2004' },
+{ oid => '4384',
+ descr => 'internal conversion function for SHIFT_JIS_2004 to UTF8',
+ proname => 'shift_jis_2004_to_utf8', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4',
+ prosrc => 'shift_jis_2004_to_utf8', probin => '$libdir/utf8_and_sjis2004' },
+{ oid => '4385',
+ descr => 'internal conversion function for UTF8 to SHIFT_JIS_2004',
+ proname => 'utf8_to_shift_jis_2004', prolang => 'c', prorettype => 'void',
+ proargtypes => 'int4 int4 cstring internal int4',
+ prosrc => 'utf8_to_shift_jis_2004', probin => '$libdir/utf8_and_sjis2004' },
+{ oid => '4386',
+ descr => 'internal conversion function for EUC_JIS_2004 to SHIFT_JIS_2004',
+ proname => 'euc_jis_2004_to_shift_jis_2004', prolang => 'c',
+ prorettype => 'void', proargtypes => 'int4 int4 cstring internal int4',
+ prosrc => 'euc_jis_2004_to_shift_jis_2004',
+ probin => '$libdir/euc2004_sjis2004' },
+{ oid => '4387',
+ descr => 'internal conversion function for SHIFT_JIS_2004 to EUC_JIS_2004',
+ proname => 'shift_jis_2004_to_euc_jis_2004', prolang => 'c',
+ prorettype => 'void', proargtypes => 'int4 int4 cstring internal int4',
+ prosrc => 'shift_jis_2004_to_euc_jis_2004',
+ probin => '$libdir/euc2004_sjis2004' },
+
# replication/origin.h
{ oid => '6003', descr => 'create a replication origin',
proname => 'pg_replication_origin_create', provolatile => 'v',
end loop;
end$$;
NOTICE: pg_constraint contains unpinned initdb-created object(s)
-NOTICE: pg_conversion contains unpinned initdb-created object(s)
NOTICE: pg_database contains unpinned initdb-created object(s)
NOTICE: pg_extension contains unpinned initdb-created object(s)
NOTICE: pg_rewrite contains unpinned initdb-created object(s)
CopyFiles(
'Error code data', $target . '/share/',
'src/backend/utils/', 'errcodes.txt');
- GenerateConversionScript($target);
GenerateTimezoneFiles($target, $conf);
GenerateTsearchFiles($target);
CopySetOfFiles(
return;
}
-sub GenerateConversionScript
-{
- my $target = shift;
- my $sql = "";
- my $F;
-
- print "Generating conversion proc script...";
- my $mf = read_file('src/backend/utils/mb/conversion_procs/Makefile');
- $mf =~ s{\\\r?\n}{}g;
- $mf =~ /^CONVERSIONS\s*=\s*(.*)$/m
- || die "Could not find CONVERSIONS line in conversions Makefile\n";
- my @pieces = split /\s+/, $1;
- while ($#pieces > 0)
- {
- my $name = shift @pieces;
- my $se = shift @pieces;
- my $de = shift @pieces;
- my $func = shift @pieces;
- my $obj = shift @pieces;
- $sql .= "-- $se --> $de\n";
- $sql .=
- "CREATE OR REPLACE FUNCTION $func (INTEGER, INTEGER, CSTRING, INTERNAL, INTEGER) RETURNS VOID AS '\$libdir/$obj', '$func' LANGUAGE C STRICT;\n";
- $sql .=
- "COMMENT ON FUNCTION $func(INTEGER, INTEGER, CSTRING, INTERNAL, INTEGER) IS 'internal conversion function for $se to $de';\n";
- $sql .= "DROP CONVERSION pg_catalog.$name;\n";
- $sql .=
- "CREATE DEFAULT CONVERSION pg_catalog.$name FOR '$se' TO '$de' FROM $func;\n";
- $sql .=
- "COMMENT ON CONVERSION pg_catalog.$name IS 'conversion for $se to $de';\n\n";
- }
- open($F, '>', "$target/share/conversion_create.sql")
- || die "Could not write to conversion_create.sql\n";
- print $F $sql;
- close($F);
- print "\n";
- return;
-}
-
sub GenerateTimezoneFiles
{
my $target = shift;