wisercoder
wisercoder
Lack of automatic conversion from text is a huge problem for tool builders. For example, let's say I am building a reporting tool. The user has entered the following query...
> For parameters we do have the ability to send values as 'unknown' which is a pseudo-type that tells Postgres to try to coerce from text. You can use it...
There appears to be several cases where the workaround of using NpgsqlDbType.Unknown doesn't work. An example is JSON column: 42883: operator does not exist: json = unknown
The scenario is automatic query refinement using AI. The AI generates and executes SQL, and AI listens for DbException to detect bad SQL. But this one threw a InvalidCastException instead...