mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-05 01:56:56 +02:00
e3d7de6b99
UNICODE => UTF8 ALT => WIN866 WIN => WIN1251 TCVN => WIN1258 The old codes continue to work.
26 lines
801 B
Plaintext
26 lines
801 B
Plaintext
--
|
|
-- create user defined conversion
|
|
--
|
|
CREATE USER conversion_test_user WITH NOCREATEDB NOCREATEUSER;
|
|
SET SESSION AUTHORIZATION conversion_test_user;
|
|
CREATE CONVERSION myconv FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8;
|
|
--
|
|
-- cannot make same name conversion in same schema
|
|
--
|
|
CREATE CONVERSION myconv FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8;
|
|
--
|
|
-- create default conversion with qualified name
|
|
--
|
|
CREATE DEFAULT CONVERSION public.mydef FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8;
|
|
--
|
|
-- cannot make default conversion with same shcema/for_encoding/to_encoding
|
|
--
|
|
CREATE DEFAULT CONVERSION public.mydef2 FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8;
|
|
--
|
|
-- drop user defined conversion
|
|
--
|
|
DROP CONVERSION myconv;
|
|
DROP CONVERSION mydef;
|
|
--
|
|
-- make sure all pre-defined conversions are fine.
|