Closed stj closed 10 months ago
PostgreSQL cannot infer the correct type of the argument from a query like this, you should cast it explicitly like this:
SELECT tstzrange('[2023-10-01 00:00Z, 2024-01-01 00:00Z)') @> $1::timestamptz
Amazing! Thanks for the quick response.
Bug description
Trying to run a containment query against a range type. https://www.postgresql.org/docs/13/rangetypes.html
Simplified version of the SQL
Using
asyncpg
with a python datetimeSame behaviour is observed with other range types
Expected behaviour
Allow the argument of a containment query to be of the range type (int, datetime, date).