@ -1,3 +1,4 @@
CREATE SCHEMA has$dollar;
-- test some errors
-- test some errors
CREATE EXTENSION test_ext1;
CREATE EXTENSION test_ext1;
ERROR: required extension "test_ext2" is not installed
ERROR: required extension "test_ext2" is not installed
@ -6,35 +7,35 @@ CREATE EXTENSION test_ext1 SCHEMA test_ext1;
ERROR: schema "test_ext1" does not exist
ERROR: schema "test_ext1" does not exist
CREATE EXTENSION test_ext1 SCHEMA test_ext;
CREATE EXTENSION test_ext1 SCHEMA test_ext;
ERROR: schema "test_ext" does not exist
ERROR: schema "test_ext" does not exist
CREATE SCHEMA test_ext;
CREATE EXTENSION test_ext1 SCHEMA has$dollar;
CREATE EXTENSION test_ext1 SCHEMA test_ext;
ERROR: extension "test_ext1" must be installed in schema "test_ext1"
ERROR: extension "test_ext1" must be installed in schema "test_ext1"
-- finally success
-- finally success
CREATE EXTENSION test_ext1 SCHEMA test_ext CASCADE;
CREATE EXTENSION test_ext1 SCHEMA has$dollar CASCADE;
NOTICE: installing required extension "test_ext2"
NOTICE: installing required extension "test_ext2"
NOTICE: installing required extension "test_ext3"
NOTICE: installing required extension "test_ext3"
NOTICE: installing required extension "test_ext5"
NOTICE: installing required extension "test_ext5"
NOTICE: installing required extension "test_ext4"
NOTICE: installing required extension "test_ext4"
SELECT extname, nspname, extversion, extrelocatable FROM pg_extension e, pg_namespace n WHERE extname LIKE 'test_ext%' AND e.extnamespace = n.oid ORDER BY 1;
SELECT extname, nspname, extversion, extrelocatable FROM pg_extension e, pg_namespace n WHERE extname LIKE 'test_ext%' AND e.extnamespace = n.oid ORDER BY 1;
extname | nspname | extversion | extrelocatable
extname | nspname | extversion | extrelocatable
-----------+-----------+------------+----------------
-----------+------------ +------------+----------------
test_ext1 | test_ext1 | 1.0 | f
test_ext1 | test_ext1 | 1.0 | f
test_ext2 | test_ext | 1.0 | t
test_ext2 | has$dollar | 1.0 | t
test_ext3 | test_ext | 1.0 | t
test_ext3 | has$dollar | 1.0 | t
test_ext4 | test_ext | 1.0 | t
test_ext4 | has$dollar | 1.0 | t
test_ext5 | test_ext | 1.0 | t
test_ext5 | has$dollar | 1.0 | t
(5 rows)
(5 rows)
CREATE EXTENSION test_ext_cyclic1 CASCADE;
CREATE EXTENSION test_ext_cyclic1 CASCADE;
NOTICE: installing required extension "test_ext_cyclic2"
NOTICE: installing required extension "test_ext_cyclic2"
ERROR: cyclic dependency detected between extensions "test_ext_cyclic1" and "test_ext_cyclic2"
ERROR: cyclic dependency detected between extensions "test_ext_cyclic1" and "test_ext_cyclic2"
DROP SCHEMA test_ext CASCADE;
DROP SCHEMA has$dollar CASCADE;
NOTICE: drop cascades to 5 other objects
NOTICE: drop cascades to 5 other objects
DETAIL: drop cascades to extension test_ext3
DETAIL: drop cascades to extension test_ext3
drop cascades to extension test_ext5
drop cascades to extension test_ext5
drop cascades to extension test_ext2
drop cascades to extension test_ext2
drop cascades to extension test_ext4
drop cascades to extension test_ext4
drop cascades to extension test_ext1
drop cascades to extension test_ext1
CREATE SCHEMA has$dollar;
CREATE EXTENSION test_ext6;
CREATE EXTENSION test_ext6;
DROP EXTENSION test_ext6;
DROP EXTENSION test_ext6;
CREATE EXTENSION test_ext6;
CREATE EXTENSION test_ext6;
@ -312,6 +313,13 @@ Objects in extension "test_ext_cine"
table ext_cine_tab3
table ext_cine_tab3
(9 rows)
(9 rows)
--
-- Test @extschema@ syntax.
--
CREATE SCHEMA "has space";
CREATE EXTENSION test_ext_extschema SCHEMA has$dollar;
ERROR: invalid character in extension "test_ext_extschema" schema: must not contain any of ""$'\"
CREATE EXTENSION test_ext_extschema SCHEMA "has space";
--
--
-- Test extension with objects outside the extension's schema.
-- Test extension with objects outside the extension's schema.
--
--
@ -358,6 +366,11 @@ DROP SCHEMA test_func_dep3;
--
--
-- Test @extschema:extname@ syntax and no_relocate option
-- Test @extschema:extname@ syntax and no_relocate option
--
--
CREATE EXTENSION test_ext_req_schema1 SCHEMA has$dollar;
CREATE EXTENSION test_ext_req_schema3 CASCADE;
NOTICE: installing required extension "test_ext_req_schema2"
ERROR: invalid character in extension "test_ext_req_schema1" schema: must not contain any of ""$'\"
DROP EXTENSION test_ext_req_schema1;
CREATE SCHEMA test_s_dep;
CREATE SCHEMA test_s_dep;
CREATE EXTENSION test_ext_req_schema1 SCHEMA test_s_dep;
CREATE EXTENSION test_ext_req_schema1 SCHEMA test_s_dep;
CREATE EXTENSION test_ext_req_schema3 CASCADE;
CREATE EXTENSION test_ext_req_schema3 CASCADE;