Adding seconds to a in PostgreSQL
The trick is to create a fixed interval and multiply it with the number of seconds in the column: SELECT start_time, expiration_time_seconds, start_time + expiration_time_seconds * interval ‘1 second’ FROM whatever ORDER BY start_time; start_time | expiration_time_seconds | end_time —————————-|————————-|—————————- 2014-08-05 08:23:32.428452 | 172800 | 2014-08-07 08:23:32.428452 2014-08-10 09:49:51.082456 | 3600 | 2014-08-10 10:49:51.082456 2014-08-13 … Read more