1 create or replace function xt.create_schema(sch text) returns boolean volatile as $$
7 /* Only create the schema if it hasn't been created already */
9 from information_schema.schemata
10 where schema_name = sch;
12 get diagnostics count = row_count;
18 query = 'create schema ' || sch || ';' ||
19 'grant all on schema ' || sch || ' to group xtrole;';
25 $$ language 'plpgsql';