rewrite create_schema in plpgsql