diff -U3 /tmp/cirrus-ci-build/src/test/modules/test_extensions/expected/test_extensions.out /tmp/cirrus-ci-build/src/test/modules/test_extensions/results/test_extensions.out --- /tmp/cirrus-ci-build/src/test/modules/test_extensions/expected/test_extensions.out 2026-02-12 21:29:51.990965013 +0000 +++ /tmp/cirrus-ci-build/src/test/modules/test_extensions/results/test_extensions.out 2026-02-12 21:33:33.280108742 +0000 @@ -756,71 +756,48 @@ -- Test owned_schema + superuser=false extension CREATE USER test_ext_user; GRANT CREATE ON DATABASE regression_test_extensions TO test_ext_user; +ERROR: database "regression_test_extensions" does not exist SET SESSION AUTHORIZATION test_ext_user; CREATE EXTENSION test_ext_owned_schema_nosuperuser; +ERROR: permission denied for database contrib_regression \dx+ test_ext_owned_schema_nosuperuser; -Objects in extension "test_ext_owned_schema_nosuperuser" - Object description -------------------------------------------------- - function test_owned_schema_nosuperuser.owned1() - schema test_owned_schema_nosuperuser -(2 rows) - -- Check that schema is owned by the creating user (not bootstrap superuser) SELECT n.nspname, n.nspowner = current_user::regrole as owned_by_current_user FROM pg_namespace n WHERE n.nspname = 'test_owned_schema_nosuperuser'; - nspname | owned_by_current_user --------------------------------+----------------------- - test_owned_schema_nosuperuser | t -(1 row) + nspname | owned_by_current_user +---------+----------------------- +(0 rows) -- Upgrades should work for superuser=false extensions ALTER EXTENSION test_ext_owned_schema_nosuperuser UPDATE TO '1.1'; +ERROR: extension "test_ext_owned_schema_nosuperuser" does not exist \dx+ test_ext_owned_schema_nosuperuser; -Objects in extension "test_ext_owned_schema_nosuperuser" - Object description -------------------------------------------------- - function test_owned_schema_nosuperuser.owned1() - function test_owned_schema_nosuperuser.owned2() - schema test_owned_schema_nosuperuser -(3 rows) - DROP EXTENSION test_ext_owned_schema_nosuperuser; +ERROR: extension "test_ext_owned_schema_nosuperuser" does not exist RESET SESSION AUTHORIZATION; -- Test owned_schema + trusted=true extension SET SESSION AUTHORIZATION test_ext_user; CREATE EXTENSION test_ext_owned_schema_trusted; +ERROR: permission denied to create extension "test_ext_owned_schema_trusted" +HINT: Must have CREATE privilege on current database to create this extension. \dx+ test_ext_owned_schema_trusted; -Objects in extension "test_ext_owned_schema_trusted" - Object description ---------------------------------------------- - function test_owned_schema_trusted.owned1() - schema test_owned_schema_trusted -(2 rows) - -- Check that schema is owned by bootstrap superuser for trusted extension, -- even though the extension is owned by test_ext_user SELECT n.nspname, n.nspowner = 10 as owned_by_bootstrap_superuser FROM pg_namespace n WHERE n.nspname = 'test_owned_schema_trusted'; - nspname | owned_by_bootstrap_superuser ----------------------------+------------------------------ - test_owned_schema_trusted | t -(1 row) + nspname | owned_by_bootstrap_superuser +---------+------------------------------ +(0 rows) -- Updating trusted extensions should work normally ALTER EXTENSION test_ext_owned_schema_trusted UPDATE TO '1.1'; +ERROR: extension "test_ext_owned_schema_trusted" does not exist \dx+ test_ext_owned_schema_trusted; -Objects in extension "test_ext_owned_schema_trusted" - Object description ---------------------------------------------- - function test_owned_schema_trusted.owned1() - function test_owned_schema_trusted.owned2() - schema test_owned_schema_trusted -(3 rows) - DROP EXTENSION test_ext_owned_schema_trusted; +ERROR: extension "test_ext_owned_schema_trusted" does not exist RESET SESSION AUTHORIZATION; REVOKE CREATE ON DATABASE regression_test_extensions FROM test_ext_user; +ERROR: database "regression_test_extensions" does not exist DROP USER test_ext_user;