Skip to content

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

Closed

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)_

Activity

  1. added
    bug
    on Sep 17, 2025
  2. codeaucafe commented on Dec 21, 2025

    @codeaucafe
    Contributor

    👋 taking a stab if thats cool.

  3. added a commit that references this issue on Dec 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions