Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hhhOu-0006Kl-Rz for pgsql-hackers@arkaria.postgresql.org; Sun, 30 Jun 2019 21:30:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hhhOr-000160-G3 for pgsql-hackers@arkaria.postgresql.org; Sun, 30 Jun 2019 21:30:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hhhOr-00015r-5X for pgsql-hackers@lists.postgresql.org; Sun, 30 Jun 2019 21:30:17 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hhhOo-0005ff-1U for pgsql-hackers@lists.postgresql.org; Sun, 30 Jun 2019 21:30:16 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x5ULU90Q012547; Sun, 30 Jun 2019 17:30:10 -0400 From: Tom Lane To: Peter Eisentraut cc: pgsql-hackers@lists.postgresql.org Subject: Re: Dead encoding conversion functions In-reply-to: <9aee00b4-93d4-54b1-08d2-9f161d59520e@2ndquadrant.com> References: <41163.1559156593@sss.pgh.pa.us> <9aee00b4-93d4-54b1-08d2-9f161d59520e@2ndquadrant.com> Comments: In-reply-to Peter Eisentraut message dated "Tue, 25 Jun 2019 14:33:14 +0200" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <12512.1561930162.0@sss.pgh.pa.us> Date: Sun, 30 Jun 2019 17:30:09 -0400 Message-ID: <12546.1561930209@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12512.1561930162.1@sss.pgh.pa.us> Peter Eisentraut writes: > On 2019-05-29 21:03, Tom Lane wrote: >> If we do delete them as useless, it might also be advisable to change >> CreateConversionCommand() to refuse creation of conversions to/from >> SQL_ASCII, to prevent future confusion. > It seems nonsensical by definition to allow that. Here's a completed patch for that. Obviously this is a bit late for v12, but if there aren't objections I'll push this soon after v13 opens. regards, tom lane ------- =_aaaaaaaaaa0 Content-Type: text/x-diff; name="remove-dead-encoding-conversions-1.patch"; charset="us-ascii" Content-ID: <12512.1561930162.2@sss.pgh.pa.us> Content-Description: remove-dead-encoding-conversions-1.patch Content-Transfer-Encoding: quoted-printable diff --git a/doc/src/sgml/charset.sgml b/doc/src/sgml/charset.sgml index a2a46c6..29fe33a 100644 --- a/doc/src/sgml/charset.sgml +++ b/doc/src/sgml/charset.sgml @@ -1896,7 +1896,11 @@ RESET client_encoding; If the client character set is defined as SQL_ASCII, encoding conversion is disabled, regardless of the server's characte= r - set. Just as for the server, use of SQL_ASCII is= unwise + set. (However, if the server's character set is + not SQL_ASCII, the server will still check that + incoming data is valid for that encoding; so the net effect is as + though the client character set were the same as the server's.) + Just as for the server, use of SQL_ASCII is unwis= e unless you are working with all-ASCII data. diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 3a8581d..7b6e530 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -2497,18 +2497,6 @@ = - ascii_to_mic - SQL_ASCII - MULE_INTERNAL - - - - ascii_to_utf8 - SQL_ASCII - UTF8 - - - big5_to_euc_tw BIG5 EUC_TW @@ -2779,12 +2767,6 @@ = - mic_to_ascii - MULE_INTERNAL - SQL_ASCII - - - mic_to_big5 MULE_INTERNAL BIG5 @@ -2905,12 +2887,6 @@ = - utf8_to_ascii - UTF8 - SQL_ASCII - - - utf8_to_big5 UTF8 BIG5 diff --git a/doc/src/sgml/ref/create_conversion.sgml b/doc/src/sgml/ref/cr= eate_conversion.sgml index 4ddbcfa..67b4bd2 100644 --- a/doc/src/sgml/ref/create_conversion.sgml +++ b/doc/src/sgml/ref/create_conversion.sgml @@ -28,12 +28,15 @@ CREATE [ DEFAULT ] CONVERSION name = CREATE CONVERSION defines a new conversion between - character set encodings. Also, conversions that - are marked DEFAULT can be used for automatic encodi= ng - conversion between - client and server. For this purpose, two conversions, from encoding A = to - B and from encoding B to A, must be defined. - + two character set encodings. + + + + Conversions that are marked DEFAULT can be used for + automatic encoding conversion between client and server. To support t= hat + usage, two conversions, from encoding A to B and + from encoding B to A, must be defined. + = To be able to create a conversion, you must have EXECUTE privilege @@ -123,6 +126,13 @@ conv_proc( Notes = + Neither the source nor the destination encoding can + be SQL_ASCII, as the server's behavior for cases + involving the SQL_ASCII encoding is + hard-wired. + + + Use DROP CONVERSION to remove user-defined conversi= ons. = diff --git a/src/backend/commands/conversioncmds.c b/src/backend/commands/= conversioncmds.c index 5afe867..cb856e8 100644 --- a/src/backend/commands/conversioncmds.c +++ b/src/backend/commands/conversioncmds.c @@ -73,6 +73,18 @@ CreateConversionCommand(CreateConversionStmt *stmt) to_encoding_name))); = /* + * We consider conversions to or from SQL_ASCII to be meaningless. (If + * you wish to change this, note that pg_do_encoding_conversion() and it= s + * sister functions have hard-wired fast paths for any conversion in whi= ch + * the source or target encoding is SQL_ASCII, so that an encoding + * conversion function declared for such a case will never be used.) + */ + if (from_encoding =3D=3D PG_SQL_ASCII || to_encoding =3D=3D PG_SQL_ASCII= ) + ereport(ERROR, + (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), + errmsg("encoding conversion to or from \"SQL_ASCII\" is not supporte= d"))); + + /* * Check the existence of the conversion function. Function name could b= e * a qualified name. */ diff --git a/src/backend/utils/mb/conv.c b/src/backend/utils/mb/conv.c index f2b51ac..3ecc92b 100644 --- a/src/backend/utils/mb/conv.c +++ b/src/backend/utils/mb/conv.c @@ -133,51 +133,6 @@ mic2latin(const unsigned char *mic, unsigned char *p,= int len, = = /* - * ASCII ---> MIC - * - * While ordinarily SQL_ASCII encoding is forgiving of high-bit-set - * characters, here we must take a hard line because we don't know - * the appropriate MIC equivalent. - */ -void -pg_ascii2mic(const unsigned char *l, unsigned char *p, int len) -{ - int c1; - - while (len > 0) - { - c1 =3D *l; - if (c1 =3D=3D 0 || IS_HIGHBIT_SET(c1)) - report_invalid_encoding(PG_SQL_ASCII, (const char *) l, len); - *p++ =3D c1; - l++; - len--; - } - *p =3D '\0'; -} - -/* - * MIC ---> ASCII - */ -void -pg_mic2ascii(const unsigned char *mic, unsigned char *p, int len) -{ - int c1; - - while (len > 0) - { - c1 =3D *mic; - if (c1 =3D=3D 0 || IS_HIGHBIT_SET(c1)) - report_untranslatable_char(PG_MULE_INTERNAL, PG_SQL_ASCII, - (const char *) mic, len); - *p++ =3D c1; - mic++; - len--; - } - *p =3D '\0'; -} - -/* * latin2mic_with_table: a generic single byte charset encoding * conversion from a local charset to the mule internal code. * diff --git a/src/backend/utils/mb/conversion_procs/Makefile b/src/backend/= utils/mb/conversion_procs/Makefile index 258ffec..413aeb9 100644 --- a/src/backend/utils/mb/conversion_procs/Makefile +++ b/src/backend/utils/mb/conversion_procs/Makefile @@ -14,9 +14,9 @@ top_builddir =3D ../../../../.. include $(top_builddir)/src/Makefile.global = SUBDIRS =3D \ - ascii_and_mic cyrillic_and_mic euc_cn_and_mic euc_jp_and_sjis \ + 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_ascii utf8_and_big5 utf8_and_cyrillic utf8_and_euc_cn \ + utf8_and_big5 utf8_and_cyrillic utf8_and_euc_cn \ utf8_and_euc_jp utf8_and_euc_kr utf8_and_euc_tw utf8_and_gb18030 \ utf8_and_gbk utf8_and_iso8859 utf8_and_iso8859_1 utf8_and_johab \ utf8_and_sjis utf8_and_win utf8_and_uhc \ diff --git a/src/backend/utils/mb/conversion_procs/ascii_and_mic/Makefile = b/src/backend/utils/mb/conversion_procs/ascii_and_mic/Makefile deleted file mode 100644 index fa65eba..0000000 --- a/src/backend/utils/mb/conversion_procs/ascii_and_mic/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -#------------------------------------------------------------------------= - -# -# src/backend/utils/mb/conversion_procs/ascii_and_mic/Makefile -# -#------------------------------------------------------------------------= - -subdir =3D src/backend/utils/mb/conversion_procs/ascii_and_mic -top_builddir =3D ../../../../../.. -include $(top_builddir)/src/Makefile.global - -NAME =3D ascii_and_mic -PGFILEDESC =3D "ascii <-> mic text conversions" - -include $(srcdir)/../proc.mk diff --git a/src/backend/utils/mb/conversion_procs/ascii_and_mic/ascii_and= _mic.c b/src/backend/utils/mb/conversion_procs/ascii_and_mic/ascii_and_mic= .c deleted file mode 100644 index 95ecc94..0000000 --- a/src/backend/utils/mb/conversion_procs/ascii_and_mic/ascii_and_mic.c +++ /dev/null @@ -1,60 +0,0 @@ -/*-----------------------------------------------------------------------= -- - * - * ASCII and MULE_INTERNAL - * - * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group - * Portions Copyright (c) 1994, Regents of the University of California - * - * IDENTIFICATION - * src/backend/utils/mb/conversion_procs/ascii_and_mic/ascii_and_mic.c - * - *-----------------------------------------------------------------------= -- - */ - -#include "postgres.h" -#include "fmgr.h" -#include "mb/pg_wchar.h" - -PG_MODULE_MAGIC; - -PG_FUNCTION_INFO_V1(ascii_to_mic); -PG_FUNCTION_INFO_V1(mic_to_ascii); - -/* ---------- - * conv_proc( - * INTEGER, -- source encoding id - * INTEGER, -- destination encoding id - * CSTRING, -- source string (null terminated C string) - * CSTRING, -- destination string (null terminated C string) - * INTEGER -- source string length - * ) returns VOID; - * ---------- - */ - -Datum -ascii_to_mic(PG_FUNCTION_ARGS) -{ - unsigned char *src =3D (unsigned char *) PG_GETARG_CSTRING(2); - unsigned char *dest =3D (unsigned char *) PG_GETARG_CSTRING(3); - int len =3D PG_GETARG_INT32(4); - - CHECK_ENCODING_CONVERSION_ARGS(PG_SQL_ASCII, PG_MULE_INTERNAL); - - pg_ascii2mic(src, dest, len); - - PG_RETURN_VOID(); -} - -Datum -mic_to_ascii(PG_FUNCTION_ARGS) -{ - unsigned char *src =3D (unsigned char *) PG_GETARG_CSTRING(2); - unsigned char *dest =3D (unsigned char *) PG_GETARG_CSTRING(3); - int len =3D PG_GETARG_INT32(4); - - CHECK_ENCODING_CONVERSION_ARGS(PG_MULE_INTERNAL, PG_SQL_ASCII); - - pg_mic2ascii(src, dest, len); - - PG_RETURN_VOID(); -} diff --git a/src/backend/utils/mb/conversion_procs/utf8_and_ascii/Makefile= b/src/backend/utils/mb/conversion_procs/utf8_and_ascii/Makefile deleted file mode 100644 index 7bd68e2..0000000 --- a/src/backend/utils/mb/conversion_procs/utf8_and_ascii/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -#------------------------------------------------------------------------= - -# -# src/backend/utils/mb/conversion_procs/utf8_and_ascii/Makefile -# -#------------------------------------------------------------------------= - -subdir =3D src/backend/utils/mb/conversion_procs/utf8_and_ascii -top_builddir =3D ../../../../../.. -include $(top_builddir)/src/Makefile.global - -NAME =3D utf8_and_ascii -PGFILEDESC =3D "utf8 <-> ascii text conversions" - -include $(srcdir)/../proc.mk diff --git a/src/backend/utils/mb/conversion_procs/utf8_and_ascii/utf8_and= _ascii.c b/src/backend/utils/mb/conversion_procs/utf8_and_ascii/utf8_and_a= scii.c deleted file mode 100644 index 37db193..0000000 --- a/src/backend/utils/mb/conversion_procs/utf8_and_ascii/utf8_and_ascii.= c +++ /dev/null @@ -1,62 +0,0 @@ -/*-----------------------------------------------------------------------= -- - * - * ASCII <--> UTF8 - * - * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group - * Portions Copyright (c) 1994, Regents of the University of California - * - * IDENTIFICATION - * src/backend/utils/mb/conversion_procs/utf8_and_ascii/utf8_and_ascii.= c - * - *-----------------------------------------------------------------------= -- - */ - -#include "postgres.h" -#include "fmgr.h" -#include "mb/pg_wchar.h" - -PG_MODULE_MAGIC; - -PG_FUNCTION_INFO_V1(ascii_to_utf8); -PG_FUNCTION_INFO_V1(utf8_to_ascii); - -/* ---------- - * conv_proc( - * INTEGER, -- source encoding id - * INTEGER, -- destination encoding id - * CSTRING, -- source string (null terminated C string) - * CSTRING, -- destination string (null terminated C string) - * INTEGER -- source string length - * ) returns VOID; - * ---------- - */ - -Datum -ascii_to_utf8(PG_FUNCTION_ARGS) -{ - unsigned char *src =3D (unsigned char *) PG_GETARG_CSTRING(2); - unsigned char *dest =3D (unsigned char *) PG_GETARG_CSTRING(3); - int len =3D PG_GETARG_INT32(4); - - CHECK_ENCODING_CONVERSION_ARGS(PG_SQL_ASCII, PG_UTF8); - - /* this looks wrong, but basically we're just rejecting high-bit-set */ - pg_ascii2mic(src, dest, len); - - PG_RETURN_VOID(); -} - -Datum -utf8_to_ascii(PG_FUNCTION_ARGS) -{ - unsigned char *src =3D (unsigned char *) PG_GETARG_CSTRING(2); - unsigned char *dest =3D (unsigned char *) PG_GETARG_CSTRING(3); - int len =3D PG_GETARG_INT32(4); - - CHECK_ENCODING_CONVERSION_ARGS(PG_UTF8, PG_SQL_ASCII); - - /* this looks wrong, but basically we're just rejecting high-bit-set */ - pg_mic2ascii(src, dest, len); - - PG_RETURN_VOID(); -} diff --git a/src/include/catalog/pg_conversion.dat b/src/include/catalog/p= g_conversion.dat index 17eff20..2dacc59 100644 --- a/src/include/catalog/pg_conversion.dat +++ b/src/include/catalog/pg_conversion.dat @@ -15,12 +15,6 @@ = [ = -{ oid =3D> '4400', descr =3D> 'conversion for SQL_ASCII to MULE_INTERNAL'= , - conname =3D> 'ascii_to_mic', conforencoding =3D> 'PG_SQL_ASCII', - contoencoding =3D> 'PG_MULE_INTERNAL', conproc =3D> 'ascii_to_mic' }, -{ oid =3D> '4401', descr =3D> 'conversion for MULE_INTERNAL to SQL_ASCII'= , - conname =3D> 'mic_to_ascii', conforencoding =3D> 'PG_MULE_INTERNAL', - contoencoding =3D> 'PG_SQL_ASCII', conproc =3D> 'mic_to_ascii' }, { oid =3D> '4402', descr =3D> 'conversion for KOI8R to MULE_INTERNAL', conname =3D> 'koi8_r_to_mic', conforencoding =3D> 'PG_KOI8R', contoencoding =3D> 'PG_MULE_INTERNAL', conproc =3D> 'koi8r_to_mic' }, @@ -165,12 +159,6 @@ { oid =3D> '4449', descr =3D> 'conversion for MULE_INTERNAL to LATIN4', conname =3D> 'mic_to_iso_8859_4', conforencoding =3D> 'PG_MULE_INTERNAL= ', contoencoding =3D> 'PG_LATIN4', conproc =3D> 'mic_to_latin4' }, -{ oid =3D> '4450', descr =3D> 'conversion for SQL_ASCII to UTF8', - conname =3D> 'ascii_to_utf8', conforencoding =3D> 'PG_SQL_ASCII', - contoencoding =3D> 'PG_UTF8', conproc =3D> 'ascii_to_utf8' }, -{ oid =3D> '4451', descr =3D> 'conversion for UTF8 to SQL_ASCII', - conname =3D> 'utf8_to_ascii', conforencoding =3D> 'PG_UTF8', - contoencoding =3D> 'PG_SQL_ASCII', conproc =3D> 'utf8_to_ascii' }, { oid =3D> '4452', descr =3D> 'conversion for BIG5 to UTF8', conname =3D> 'big5_to_utf8', conforencoding =3D> 'PG_BIG5', contoencoding =3D> 'PG_UTF8', conproc =3D> 'big5_to_utf8' }, diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc= .dat index 8733524..68719cd 100644 --- a/src/include/catalog/pg_proc.dat +++ b/src/include/catalog/pg_proc.dat @@ -10070,16 +10070,6 @@ prosrc =3D> 'binary_upgrade_set_missing_value' }, = # conversion functions -{ oid =3D> '4300', - descr =3D> 'internal conversion function for SQL_ASCII to MULE_INTERNAL= ', - proname =3D> 'ascii_to_mic', prolang =3D> 'c', prorettype =3D> 'void', - proargtypes =3D> 'int4 int4 cstring internal int4', prosrc =3D> 'ascii_= to_mic', - probin =3D> '$libdir/ascii_and_mic' }, -{ oid =3D> '4301', - descr =3D> 'internal conversion function for MULE_INTERNAL to SQL_ASCII= ', - proname =3D> 'mic_to_ascii', prolang =3D> 'c', prorettype =3D> 'void', - proargtypes =3D> 'int4 int4 cstring internal int4', prosrc =3D> 'mic_to= _ascii', - probin =3D> '$libdir/ascii_and_mic' }, { oid =3D> '4302', descr =3D> 'internal conversion function for KOI8R to MULE_INTERNAL', proname =3D> 'koi8r_to_mic', prolang =3D> 'c', prorettype =3D> 'void', @@ -10312,16 +10302,6 @@ proname =3D> 'mic_to_latin4', prolang =3D> 'c', prorettype =3D> 'void', proargtypes =3D> 'int4 int4 cstring internal int4', prosrc =3D> 'mic_to= _latin4', probin =3D> '$libdir/latin_and_mic' }, -{ oid =3D> '4350', - descr =3D> 'internal conversion function for SQL_ASCII to UTF8', - proname =3D> 'ascii_to_utf8', prolang =3D> 'c', prorettype =3D> 'void', - proargtypes =3D> 'int4 int4 cstring internal int4', prosrc =3D> 'ascii_= to_utf8', - probin =3D> '$libdir/utf8_and_ascii' }, -{ oid =3D> '4351', - descr =3D> 'internal conversion function for UTF8 to SQL_ASCII', - proname =3D> 'utf8_to_ascii', prolang =3D> 'c', prorettype =3D> 'void', - proargtypes =3D> 'int4 int4 cstring internal int4', prosrc =3D> 'utf8_t= o_ascii', - probin =3D> '$libdir/utf8_and_ascii' }, { oid =3D> '4352', descr =3D> 'internal conversion function for BIG5 to U= TF8', proname =3D> 'big5_to_utf8', prolang =3D> 'c', prorettype =3D> 'void', proargtypes =3D> 'int4 int4 cstring internal int4', prosrc =3D> 'big5_t= o_utf8', diff --git a/src/include/mb/pg_wchar.h b/src/include/mb/pg_wchar.h index ec101a8..60c5615 100644 --- a/src/include/mb/pg_wchar.h +++ b/src/include/mb/pg_wchar.h @@ -614,8 +614,6 @@ extern void report_untranslatable_char(int src_encodin= g, int dest_encoding, = extern void local2local(const unsigned char *l, unsigned char *p, int len= , int src_encoding, int dest_encoding, const unsigned char *tab); -extern void pg_ascii2mic(const unsigned char *l, unsigned char *p, int le= n); -extern void pg_mic2ascii(const unsigned char *mic, unsigned char *p, int = len); extern void latin2mic(const unsigned char *l, unsigned char *p, int len, int lc, int encoding); extern void mic2latin(const unsigned char *mic, unsigned char *p, int len= , diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/= expected/alter_table.out index e687150..52e9baf 100644 --- a/src/test/regress/expected/alter_table.out +++ b/src/test/regress/expected/alter_table.out @@ -2713,7 +2713,7 @@ as 'select $1.f1 is not distinct from $2.f1 and $1.f= 2 is not distinct from $2.f2 create operator alter1.=3D(procedure =3D alter1.same, leftarg =3D alter1= .ctype, rightarg =3D alter1.ctype); create operator class alter1.ctype_hash_ops default for type alter1.ctype= using hash as operator 1 alter1.=3D(alter1.ctype, alter1.ctype); -create conversion alter1.ascii_to_utf8 for 'sql_ascii' to 'utf8' from asc= ii_to_utf8; +create conversion alter1.latin1_to_utf8 for 'latin1' to 'utf8' from iso88= 59_1_to_utf8; create text search parser alter1.prs(start =3D prsd_start, gettoken =3D p= rsd_nexttoken, end =3D prsd_end, lextypes =3D prsd_lextype); create text search configuration alter1.cfg(parser =3D alter1.prs); create text search template alter1.tmpl(init =3D dsimple_init, lexize =3D= dsimple_lexize); @@ -2731,7 +2731,7 @@ alter operator alter1.=3D(alter1.ctype, alter1.ctype= ) set schema alter2; alter function alter1.same(alter1.ctype, alter1.ctype) set schema alter2; alter type alter1.ctype set schema alter1; -- no-op, same schema alter type alter1.ctype set schema alter2; -alter conversion alter1.ascii_to_utf8 set schema alter2; +alter conversion alter1.latin1_to_utf8 set schema alter2; alter text search parser alter1.prs set schema alter2; alter text search configuration alter1.cfg set schema alter2; alter text search template alter1.tmpl set schema alter2; @@ -2775,7 +2775,7 @@ drop cascades to type alter2.ctype drop cascades to function alter2.same(alter2.ctype,alter2.ctype) drop cascades to operator alter2.=3D(alter2.ctype,alter2.ctype) drop cascades to operator family alter2.ctype_hash_ops for access method = hash -drop cascades to conversion alter2.ascii_to_utf8 +drop cascades to conversion alter2.latin1_to_utf8 drop cascades to text search parser alter2.prs drop cascades to text search configuration alter2.cfg drop cascades to text search template alter2.tmpl diff --git a/src/test/regress/expected/object_address.out b/src/test/regre= ss/expected/object_address.out index de75b9a..cdbde29 100644 --- a/src/test/regress/expected/object_address.out +++ b/src/test/regress/expected/object_address.out @@ -394,7 +394,7 @@ WITH objects (type, name, args) AS (VALUES ('collation', '{default}', '{}'), ('table constraint', '{addr_nsp, gentable, a_chk}', '{}'), ('domain constraint', '{addr_nsp.gendomain}', '{domconstr}'), - ('conversion', '{pg_catalog, ascii_to_mic}', '{}'), + ('conversion', '{pg_catalog, koi8_r_to_mic}', '{}'), ('default value', '{addr_nsp, gentable, b}', '{}'), ('language', '{plpgsql}', '{}'), -- large object @@ -468,7 +468,7 @@ SELECT (pg_identify_object(addr1.classid, addr1.objid,= addr1.objsubid)).*, cast | | | (bigint AS = integer) | t table constraint | addr_nsp | | a_chk on ad= dr_nsp.gentable | t domain constraint | addr_nsp | | domconstr o= n addr_nsp.gendomain | t - conversion | pg_catalog | ascii_to_mic | pg_catalog.= ascii_to_mic | t + conversion | pg_catalog | koi8_r_to_mic | pg_catalog.= koi8_r_to_mic | t language | | plpgsql | plpgsql = | t schema | | addr_nsp | addr_nsp = | t operator class | pg_catalog | int4_ops | pg_catalog.= int4_ops USING btree | t diff --git a/src/test/regress/sql/alter_table.sql b/src/test/regress/sql/a= lter_table.sql index 8016f8a..99af0b8 100644 --- a/src/test/regress/sql/alter_table.sql +++ b/src/test/regress/sql/alter_table.sql @@ -1735,7 +1735,7 @@ create operator alter1.=3D(procedure =3D alter1.same= , leftarg =3D alter1.ctype, right create operator class alter1.ctype_hash_ops default for type alter1.ctype= using hash as operator 1 alter1.=3D(alter1.ctype, alter1.ctype); = -create conversion alter1.ascii_to_utf8 for 'sql_ascii' to 'utf8' from asc= ii_to_utf8; +create conversion alter1.latin1_to_utf8 for 'latin1' to 'utf8' from iso88= 59_1_to_utf8; = create text search parser alter1.prs(start =3D prsd_start, gettoken =3D p= rsd_nexttoken, end =3D prsd_end, lextypes =3D prsd_lextype); create text search configuration alter1.cfg(parser =3D alter1.prs); @@ -1756,7 +1756,7 @@ alter operator alter1.=3D(alter1.ctype, alter1.ctype= ) set schema alter2; alter function alter1.same(alter1.ctype, alter1.ctype) set schema alter2; alter type alter1.ctype set schema alter1; -- no-op, same schema alter type alter1.ctype set schema alter2; -alter conversion alter1.ascii_to_utf8 set schema alter2; +alter conversion alter1.latin1_to_utf8 set schema alter2; alter text search parser alter1.prs set schema alter2; alter text search configuration alter1.cfg set schema alter2; alter text search template alter1.tmpl set schema alter2; diff --git a/src/test/regress/sql/object_address.sql b/src/test/regress/sq= l/object_address.sql index bd94cd6..725bc39 100644 --- a/src/test/regress/sql/object_address.sql +++ b/src/test/regress/sql/object_address.sql @@ -164,7 +164,7 @@ WITH objects (type, name, args) AS (VALUES ('collation', '{default}', '{}'), ('table constraint', '{addr_nsp, gentable, a_chk}', '{}'), ('domain constraint', '{addr_nsp.gendomain}', '{domconstr}'), - ('conversion', '{pg_catalog, ascii_to_mic}', '{}'), + ('conversion', '{pg_catalog, koi8_r_to_mic}', '{}'), ('default value', '{addr_nsp, gentable, b}', '{}'), ('language', '{plpgsql}', '{}'), -- large object ------- =_aaaaaaaaaa0--