PostgreSQL - How to convert seconds in a numeric field to HH:MM:SS
SELECT TO_CHAR('1000 second'::interval, 'HH24:MI:SS')
or, in your case
SELECT TO_CHAR((mycolumn || ' second')::interval, 'HH24:MI:SS')
FROM mytable
To convert seconds to HH:MM:SS
SELECT 120 * interval '1 sec';
You will get 00:02:00
To convert minutes to HH:MM:SS
SELECT 120 * interval '1 min';
You will get 02:00:00