secret
Last active

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
create table f (
i interval
);
 
insert into f values ('4 days');
insert into f values ('6 years');
insert into f values ('30 minute');
 
select * from f;
----------
4 days
6 years
00:30:00
(3 rows)
 
select now(), now() + i from f;
-------------------------------+-------------------------------
2013-05-08 15:34:30.052171-07 | 2013-05-12 15:34:30.052171-07
2013-05-08 15:34:30.052171-07 | 2019-05-08 15:34:30.052171-07
2013-05-08 15:34:30.052171-07 | 2013-05-08 16:04:30.052171-07

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.