Open mluatgmxdotch opened 4 months ago
not sure why this helped
Because it didn't have to convert a DateTimeOffset
in that case, which must be the issue.
The bug is probably happening because a DateTimeOffset
is compared to a DateTime
and it's not correctly handled. Should be easy to repro, thanks.
Hi all,
The following (simplified) query using an predicate and an index
results in the following exception using postgresql dialect but not on sqlite:
Full original query can be found here.
Used Version:
This only occurs when using PostgreSQL dialect. Workaround that helped but I'm not sure about the side effects:
Removing the DateTimeOffset type handler in PostgreSqlDialect
https://github.com/sebastienros/yessql/blob/main/src/YesSql.Provider.PostgreSql/PostgreSqlDialect.cs#L96
or changing the predicate to use a temporary date-time variable (not sure why this helped)