I've inherited a database with a quirky schema. Without boring of the details I have an odd use case.
The table contains a filed completed_at that is a timestamp without timezone. What I'm trying to do is order the results by the timestamp where the timestamp is > X
The kicker is X is a numeric (or decimal) value. Trying to convert the timestamp to int is failing or even to string.
If you simply try completed_at > 0 you get
extract(epoch from timestamp_column)?201501010800(meaning2015-01-01 08:00)?