Re: [GENERAL] Date math question

2008-11-26 Thread Steve Crawford
Kevin Kempter wrote: 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: se

[GENERAL] Date math question

2008-11-26 Thread Kevin Kempter
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 d

Re: [GENERAL] Date math question

2008-11-26 Thread Raymond O'Donnell
On 26/11/2008 18:54, Kevin Kempter wrote: > 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 Something like this? - sel

Re: [GENERAL] Date math question

2008-11-26 Thread hubert depesz lubaczewski
On Wed, Nov 26, 2008 at 11:54:33AM -0700, Kevin Kempter wrote: > select ts, ts + interval dursec seconds from tmp2 limit 1; > select ts, ts + 'seconds' dursec from tmp2 limit 1; select ts, ts + dursec * '1 second'::interval ... depesz -- Linkedin: http://www.linkedin.com/in/depesz / blog: htt

[GENERAL] Date math question

2008-11-26 Thread Kevin Kempter
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 d