Re: BUG #17909: CREATE SCHEMA AUTHORIZATION sch CREATE TABLE foo ( id INT ) will coredump - Mailing list pgsql-bugs

From Richard Guo
Subject Re: BUG #17909: CREATE SCHEMA AUTHORIZATION sch CREATE TABLE foo ( id INT ) will coredump
Date
Msg-id CAMbWs49LjsDYOH5QejRKJyqYZSa2Q9j6LJ8Ae4zrvgMw-fYoEQ@mail.gmail.com
Whole thread Raw
In response to Re: BUG #17909: CREATE SCHEMA AUTHORIZATION sch CREATE TABLE foo ( id INT ) will coredump  (Michael Paquier <michael@paquier.xyz>)
Responses Re: BUG #17909: CREATE SCHEMA AUTHORIZATION sch CREATE TABLE foo ( id INT ) will coredump
List pgsql-bugs

On Fri, Apr 28, 2023 at 9:43 AM Michael Paquier <michael@paquier.xyz> wrote:
Attached is what I am finishing with, where I have reworked
transformCreateSchemaStmt() so as it uses in input the list of
elements from CREATE SCHEMA and the schema name computed depending on
the security context, documenting requirements on the way (note the
extra unconstify for the RangeVars' schemas).  I have added a couple
of regression tests for all the object types that have schema
qualication checks, mixed with role specs and schema names.

Thoughts, comments or objections?

+1.  I like the refactor of transformCreateSchemaStmt.

BTW, the comment states that CreateSchemaStmtContext.stmtType is "CREATE
SCHEMA" or "ALTER SCHEMA".   But it seems that there is no chance to set
it to "ALTER SCHEMA".  So should we update that comment, or go even
further to remove CreateSchemaStmtContext.stmtType since it is not used?

Thanks
Richard

pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: BUG #17909: CREATE SCHEMA AUTHORIZATION sch CREATE TABLE foo ( id INT ) will coredump
Next
From: Michael Paquier
Date:
Subject: Re: BUG #17909: CREATE SCHEMA AUTHORIZATION sch CREATE TABLE foo ( id INT ) will coredump