You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[release] fix: resolve NotSupportedException for schema-qualified PostgreSQL enum types (#421)
* fix: resolve NotSupportedException for schema-qualified PostgreSQL enum types
When a PostgreSQL column references an enum type with schema qualification
(e.g., `block_type public.post_block_type`), sqlc sets `column.Type.Schema`
to `public`. However, `ConstructEnumsLookup` normalizes default schema
enums under key `` (empty string), causing `GetEnumType` to fail the
lookup and throw `NotSupportedException`.
Fixed by normalizing the schema name in `GetEnumSchemaAndName` to empty
string when it matches the driver's DefaultSchema.
Changes:
- Drivers/NpgsqlDriver.cs: normalize default schema in GetEnumSchemaAndName
- unit-tests/CodegenTests/CodegenSchemaTests.cs: add failing-then-passing test
- examples/config/postgresql/types/: add schema-qualified enum table + queries
- examples/Npgsql*Example/: regenerated code with new model/queries
- end2end/: add truncation for new table in e2e TearDown
* fixup: use Any() instead of First() + null assertion in test
* fix: bump MySQL version from 8.4.6 to 8.4.9 in legacy CI workflow
8.4.6 was removed from the MySQL CDN (404), causing Chocolatey install
to fail. 8.4.9 is the latest 8.4.x patch available.
* fix: remove MySQL version pin in legacy CI workflow
The pinned versions 8.4.6 and 8.4.9 both fail — 8.4.6 downloads from a
dead CDN URL, and 8.4.9 doesn't exist on Chocolatey. Removing the pin
lets Chocolatey resolve the latest approved version with a valid URL.
* refactor: merge qualified enum column into existing postgres_special_types table
Move c_qualified_enum (public.c_enum) into the existing
postgres_special_types table instead of a separate
postgres_qualified_enum_types table, per PR feedback.
The schema-qualified enum type is tested alongside the existing
unqualified c_enum column in the same table and its queries.
This avoids adding a new table to the schema.
0 commit comments