dolthub/doltgresql#1863: validate database exists before CREATE SCHEMA by codeaucafe · Pull Request #2139 · dolthub/doltgresql

@codeaucafe

Add ValidateCreateSchema analyzer rule that checks if the current
database has a valid root before allowing CREATE SCHEMA to proceed.
This ensures PostgreSQL-compliant behavior where schemas must be
created within an existing database.

Adds Go integration test and bats end-to-end tests to verify the
following:
- Connection to non-existent database fails with error
- CREATE SCHEMA succeeds on valid database

Refs: dolthub#1863

@codeaucafe codeaucafe changed the title j dolthub/doltgresql#1863: validate database exists before CREATE SCHEMA

Dec 22, 2025