From: Michael Paquier <michael@paquier.xyz>
To: hysong0101@163.com
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17909: CREATE SCHEMA AUTHORIZATION sch CREATE TABLE foo ( id INT ) will coredump
Date: Thu, 27 Apr 2023 16:34:23 +0900
Message-ID: <ZEolfwBHm6+znydH@paquier.xyz> (raw)
In-Reply-To: <17909-f65c12dfc5f0451d@postgresql.org>
References: <17909-f65c12dfc5f0451d@postgresql.org>
On Thu, Apr 27, 2023 at 03:44:04AM +0000, PG Bug reporting form wrote:
> When we CREATE SCHEMA AUTHORIZATION rolname CREATE TABLE/SEQUENCE/VIEW
> sch.obj and sch is not NULL,
> the database will coredump.
It took me a couple of minutes to get what you meant here. The point
is that schema-qualifying any of the object specified after the CREATE
SCHEMA with a schema name different than the rolname would cause a
crash, when no schema is directly given. We should fail with the same
error than when a schema is specified, as of, except that the rolename
needs to be specified:
=# create schema popo authorization postgres create table lala.aa (a int);
ERROR: 42P15: CREATE specifies a schema (lala) different from the one being created (popo)
That seems quite old, at quick glance (v11 fails), so this needs to be
fixed all the way down. Will fix, nice catch!
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: michael@paquier.xyz, 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: <ZEolfwBHm6+znydH@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox