-- Cases where schema creation fails as objects are qualified with a schema -- that does not match with what's expected. -- This checks all the object types that include schema qualifications. CREATESCHEMA AUTHORIZATION regress_create_schema_role CREATE SEQUENCE schema_not_existing.seq; CREATESCHEMA AUTHORIZATION regress_create_schema_role CREATETABLE schema_not_existing.tab (id int); CREATESCHEMA AUTHORIZATION regress_create_schema_role CREATE VIEW schema_not_existing.view ASSELECT1; CREATESCHEMA AUTHORIZATION regress_create_schema_role CREATEINDEXON schema_not_existing.tab (id); CREATESCHEMA AUTHORIZATION regress_create_schema_role CREATETRIGGER schema_trig BEFOREINSERTON schema_not_existing.tab
EXECUTE FUNCTION schema_trig.no_func(); -- Again, with a role specification and no schema names. SET ROLE regress_create_schema_role; CREATESCHEMA AUTHORIZATION CURRENT_ROLE CREATE SEQUENCE schema_not_existing.seq; CREATESCHEMA AUTHORIZATION CURRENT_ROLE CREATETABLE schema_not_existing.tab (id int); CREATESCHEMA AUTHORIZATION CURRENT_ROLE CREATE VIEW schema_not_existing.view ASSELECT1; CREATESCHEMA AUTHORIZATION CURRENT_ROLE CREATEINDEXON schema_not_existing.tab (id); CREATESCHEMA AUTHORIZATION CURRENT_ROLE CREATETRIGGER schema_trig BEFOREINSERTON schema_not_existing.tab
EXECUTE FUNCTION schema_trig.no_func(); -- Again, with a schema name and a role specification. CREATESCHEMA regress_schema_1 AUTHORIZATION CURRENT_ROLE CREATE SEQUENCE schema_not_existing.seq; CREATESCHEMA regress_schema_1 AUTHORIZATION CURRENT_ROLE CREATETABLE schema_not_existing.tab (id int); CREATESCHEMA regress_schema_1 AUTHORIZATION CURRENT_ROLE CREATE VIEW schema_not_existing.view ASSELECT1; CREATESCHEMA regress_schema_1 AUTHORIZATION CURRENT_ROLE CREATEINDEXON schema_not_existing.tab (id); CREATESCHEMA regress_schema_1 AUTHORIZATION CURRENT_ROLE CREATETRIGGER schema_trig BEFOREINSERTON schema_not_existing.tab
EXECUTE FUNCTION schema_trig.no_func();
RESET ROLE;
-- Cases where the schema creation succeeds. -- The schema created matches the role name. CREATESCHEMA AUTHORIZATION regress_create_schema_role CREATETABLE regress_create_schema_role.tab (id int);
\d regress_create_schema_role.tab DROPSCHEMA regress_create_schema_role CASCADE; -- Again, with a different role specification and no schema names. SET ROLE regress_create_schema_role; CREATESCHEMA AUTHORIZATION CURRENT_ROLE CREATETABLE regress_create_schema_role.tab (id int);
\d regress_create_schema_role.tab DROPSCHEMA regress_create_schema_role CASCADE; -- Again, with a schema name and a role specification. CREATESCHEMA regress_schema_1 AUTHORIZATION CURRENT_ROLE CREATETABLE regress_schema_1.tab (id int);
\d regress_schema_1.tab DROPSCHEMA regress_schema_1 CASCADE;
RESET ROLE;
-- Clean up DROP ROLE regress_create_schema_role;
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet am 2026-08-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.