Please advise how I can achieve simplicity working with time ranges in Postgresql. I want to perform queries like:
SELECT user_id
FROM user_logs
WHERE login_time_range BETWEEN '20:00' AND '02:00'
Note, I am not looking for datetime type. I am also aware of tsrange which does not suit my needs neither.
In the query above i want to store login_time_range as a range of starting and ending hour.
For example: [01:00, 02:30)
Later I wanna query to check weather login_time_range is falling into the range of the WHERE clause.