`eb.case`'s `then`, `thenRef`, `else` and `elseRef` might be too permissive.
Author: igalklebanovCreated Oct 4, 2025Updated Sep 15, 2026
Labelsbugpostgresapitypescript
Hey
Currently, then, thenRef*, else and elseRef* are too permissive at compile-time.
Engines like PostgreSQL will fail queries based on case return data type group mismatches.
Fail if there is not an implicit conversion from a given input type to the candidate type https://www.postgresql.org/docs/current/typeconv-union-case.html
While engines like MySQL are accepting all combos.
* pending release in 0.29.
Source: kysely-org/kysely