Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp> writes:
> The attached patch adds permission check at the scenario that I
> explained bellow.
Instead of using this patch, I changed the code to call
CreateSchemaCommand itself. The test that was still missing was the one
to restrict the schema name to not start with "pg_". It seemed to me
that if we were treating this as a basically nonprivileged schema
creation operation, that rule ought to be enforced too, as well as any
other restrictions that we might someday add to CREATE SCHEMA execution.
regards, tom lane