I am trying to understand why my query gives no results when I know it should. I am running this command:
SELECT * FROM "users" WHERE time + 3h > now();
I am expecting to get one entry as I just added it, but I don’t get any results.
I’ve never seen that syntax (time + 3h
), have a look at the docs, you usually do the opposite and that might be the issue… some tool might give a proper error, others don’t.
try
SELECT * FROM "users" WHERE time > now() -3h;
you may also want to set the retention policy explicitly (if you have more than one)