Hi bgroper
Although we love doing stuff in perl – if it's all the same, why not adjust your query so that your result set contains only that which you're interested in? a la SELECT statement below:
-- table set up
CREATE TABLE test(
test_id INTEGER
,date_tstamp TIMESTAMP NOT NULL DEFAULT LOCALTIMESTAMP
,CONSTRAINT test_test_id_pkey PRIMARY KEY (test_id)
);
INSERT INTO test
VALUES (1,now())
,(2,now())
,(3,now())
,(4,now() + INTERVAL '60 days')
,(5,now() + INTERVAL '70 days')
;
-- select statement
SELECT date_tstamp
FROM test
WHERE date_tstamp > (now() + INTERVAL '59 days');
Best regards,
Shadowsong