look for missing datetime records in database
You can do something similar.  First generate the minutes (if you do this often, probably you would like to store them in a permanent, indexed table), then pick the ones not in your table.  The query would look like (no looping!):

WITH minutes(m) AS (
    SELECT i::timestamp(0) 
    FROM generate_series('2013-04-17 12:00:00', '2013-04-17 13:00:00', interval '1 minute') t(i)
)
SELECT m
FROM 
    minutes
    LEFT JOIN your_table ON m = your_timestamp
WHERE your_table_id IS NULL;


You may have to transform your timestamp stored if the seconds part is non-zero.  And, with big amounts of data at least, you will need an index defined on the timestamp (and possibly your_table_id, it would help a lot if you use PostgreSQL 9.2).