Date math question - Mailing list pgsql-general

From Kevin Kempter
Subject Date math question
Date
Msg-id 200811261122.24456.kevin@kevinkempterllc.com
Whole thread Raw
Responses Re: Date math question
List pgsql-general
Hi All;

I have a table that contains 2 columns ts (a timestamp) and dursec (a float -
number of seconds)

I want to insert the following into another table:

the ts (timestamp column) and a second date which is ts + dursec

I tried these select variations with no luck:

select ts, ts + interval dursec seconds from tmp2 limit 1;

select ts, ts + 'seconds' dursec from tmp2 limit 1;



Anyone know the correct syntax for this ?


Thanks in advance

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Odd on-update inconsistency
Next
From: Alvaro Herrera
Date:
Subject: Re: pg_get_serial_sequence Strangeness/Unreliable?