gt and lt conditional filter behaves like gte and lte filter for timestampz column

when i filter with greater than or less than filter operator from drizzle orm, it returns results greater than or less than depending on the operator used along with the row that matches the filter value essentially behaving like greater than or equal to and less than or equal to operators. the filter value is a date, i also tried it with a string by setting the timestampz column mode to a string but still got the same result. the only solution i hv found so far is by truncating the date value and timestampz column to seconds before filtering with date_trunc but this solution doesn't allow postgres to use the index for the column. i hv attached the only working solution but it's not the best because of the index not used. what am i doing wrong?
No description
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?