summaryrefslogtreecommitdiffstats
path: root/src/test/regress/expected/conversion.out
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/regress/expected/conversion.out')
-rw-r--r--src/test/regress/expected/conversion.out39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/test/regress/expected/conversion.out b/src/test/regress/expected/conversion.out
new file mode 100644
index 0000000..62c1067
--- /dev/null
+++ b/src/test/regress/expected/conversion.out
@@ -0,0 +1,39 @@
+--
+-- create user defined conversion
+--
+CREATE USER regress_conversion_user WITH NOCREATEDB NOCREATEROLE;
+SET SESSION AUTHORIZATION regress_conversion_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;
+ERROR: conversion "myconv" already exists
+--
+-- 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 schema/for_encoding/to_encoding
+--
+CREATE DEFAULT CONVERSION public.mydef2 FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8;
+ERROR: default conversion for LATIN1 to UTF8 already exists
+-- test comments
+COMMENT ON CONVERSION myconv_bad IS 'foo';
+ERROR: conversion "myconv_bad" does not exist
+COMMENT ON CONVERSION myconv IS 'bar';
+COMMENT ON CONVERSION myconv IS NULL;
+--
+-- drop user defined conversion
+--
+DROP CONVERSION myconv;
+DROP CONVERSION mydef;
+--
+-- Note: the built-in conversions are exercised in opr_sanity.sql,
+-- so there's no need to do that here.
+--
+--
+-- return to the super user
+--
+RESET SESSION AUTHORIZATION;
+DROP USER regress_conversion_user;