Re: BUG #17909: CREATE SCHEMA AUTHORIZATION sch CREATE TABLE foo ( id INT ) will coredump
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Richard Guo <guofenglinux@gmail.com>, hysong0101@163.com,
pgsql-bugs@lists.postgresql.org
Date: 2023-04-28T04:53:39Z
Lists: pgsql-bugs
Michael Paquier <michael@paquier.xyz> writes: > On Fri, Apr 28, 2023 at 11:29:11AM +0800, Richard Guo wrote: >> 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? > Indeed. I'd be OK with adjusting the comment, without removing > stmtType to keep some consistency with CreateStmt, and it could be > useful for debugging, perhaps.. (See 46379d6 as one origin point). I'd be okay with just dropping that field. It seems to be much older than 46379d6, and if it ever had any real use it doesn't now. (There's no ALTER SCHEMA in the SQL spec at all, let alone one that has some overlap with CREATE SCHEMA options, so I don't foresee a future use either.) regards, tom lane
Commits
-
Fix crashes with CREATE SCHEMA AUTHORIZATION and schema elements
- a9212716b3bf 11.20 landed
- 63f7e91ecf9f 12.15 landed
- 7e95a33b42e7 13.11 landed
- d29eba1987cb 14.8 landed
- b9ad73ad250b 15.3 landed
- 4dadd660f071 16.0 landed