doltgresql icon indicating copy to clipboard operation
doltgresql copied to clipboard

Handle PostgreSQL CREATE SCHEMA error when no database is selected

Open elianddb opened this issue 3 months ago • 0 comments

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.

https://github.com/dolthub/go-mysql-server/pull/3217#discussion_r2356319743_

elianddb avatar Sep 17 '25 19:09 elianddb