Skip to content

Handle PostgreSQL CREATE SCHEMA error when no database is selected #1863

@elianddb

Description

@elianddb

Currently, the buildCreateSchema function treats CREATE SCHEMA as a synonym for CREATE DATABASE if no database is selected, following MySQL behavior. This is to support clients like DBeaver which make use of this feature to create databases. dolthub/dolt#9830

For PostgreSQL compatibility, an error should be returned when no database is selected, as PostgreSQL requires a database context for schema creation.

dolthub/go-mysql-server#3217 (comment)_

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions