doltgresql
doltgresql copied to clipboard
Handle PostgreSQL CREATE SCHEMA error when no database is selected
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_