On Tue, Dec 06, 2005 at 11:54:05AM -0500, Bruce Momjian wrote:
> test=> SELECT current_timestamp + cast(x || ' months' AS INTERVAL) FROM
> test;
> ?column?
> -------------------------------
> 2006-03-06 11:53:05.574279-05
> (1 row)
Or another way:
test=> CREATE TABLE test (x numeric);
CREATE TABLE
test=> INSERT INTO test VALUES (3);
INSERT 0 1
test=> SELECT current_timestamp + x * interval'1 month' FROM test; ?column?
-------------------------------2006-03-06 12:07:48.112765-05
(1 row)
--
Michael Fuhr