Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1psBMK-0001N5-Pl for pgsql-bugs@arkaria.postgresql.org; Thu, 27 Apr 2023 23:49:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1psBMJ-0005sW-EV for pgsql-bugs@arkaria.postgresql.org; Thu, 27 Apr 2023 23:49:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1psBMJ-0005sM-60 for pgsql-bugs@lists.postgresql.org; Thu, 27 Apr 2023 23:49:07 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1psBMB-005TDo-KH for pgsql-bugs@lists.postgresql.org; Thu, 27 Apr 2023 23:49:06 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 33RNmngM1237483; Thu, 27 Apr 2023 19:48:49 -0400 From: Tom Lane To: Michael Paquier cc: Richard Guo , hysong0101@163.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17909: CREATE SCHEMA AUTHORIZATION sch CREATE TABLE foo ( id INT ) will coredump In-reply-to: References: <17909-f65c12dfc5f0451d@postgresql.org> Comments: In-reply-to Michael Paquier message dated "Fri, 28 Apr 2023 08:05:22 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1237481.1682639329.1@sss.pgh.pa.us> Date: Thu, 27 Apr 2023 19:48:49 -0400 Message-ID: <1237482.1682639329@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Paquier writes: > It's actually much trickier than that, on second look, as a RoleSpec > is embedded in this portion of a query because we need to support > CURRENT_ROLE, CURRENT_SESSION and SESSION_USER. For example, this > query assigns neither role name nor schema name we could rely on at > transformation for the objects: > create schema authorization current_role create table aa (a int); Seems like the answer needs to involve postponing examination of the contained DDL until we've figured out what the new schema's name is going to be. regards, tom lane