On 04/09/2026 22:30, Tom Lane wrote:
Noah Misch <[email protected]> writes:
On Fri, Sep 04, 2026 at 10:21:52AM -0400, Tom Lane wrote:
What would you have us do differently?
I recommend reverting the v19 CREATE SCHEMA changes, unfortunately. The
thread started with what smelled like low-hanging fruit: let users write
"CREATE SCHEMA myschema CREATE DOMAIN mydomain" instead of "CREATE SCHEMA
myschema; CREATE DOMAIN myschema.mydomain". That led to a9c350d silently
changing the meaning of CREATE SCHEMA statements that v18 already accepts.
Since the benefit of supporting "CREATE SCHEMA myschema CREATE DOMAIN
mydomain" is so modest, it doesn't take much of a problem to outweigh that
benefit.
Well, you have a point. There's pretty nearly nothing that's
well-designed about CREATE SCHEMA subcommands: as you say, the syntax
is shaky, and the namespace visible to subcommands is unclear, and
the whole business of re-ordering subcommands is debatable, and even
if all those things were fixed the benefit of the entire feature is
marginal. So maybe we should just say that our legacy implementation
is what it is and we will mark it deprecated rather than putting any
effort into improving it. I'd like to see more than one vote in favor
of that before I do it, though.
Reverting seems like the safest thing to do. This is a really niche
thing, but whatever behavior we pick, we'll be stuck with it for a long
time. If we're not 100% certain about the new behavior, better to take a
step back and discuss and design it with more time.
- Heikki