Re: Create interval using column value? - Mailing list pgsql-sql

From Michael Glaesemann
Subject Re: Create interval using column value?
Date
Msg-id DFDD31D0-2633-11D9-87A8-000A95C88220@myrealbox.com
Whole thread Raw
In response to Create interval using column value?  (Larry Lennhoff <llennhoff-postgres@pexicom.com>)
List pgsql-sql
On Oct 25, 2004, at 11:54 AM, Larry Lennhoff wrote:

> SELECT A.id FROM A JOIN B ON (join_col) WHERE built_on < now() - 
> interval 'build_interval seconds';

It would help to see the error you're getting, but I suspect it has 
something to do with the fact that you're quoting 'build_interval'. Try 
something like WHERE built_on < current_timestamp - build_interval *  
INTERVAL '0.001 second';
(btw, current_timestamp is the SQL standard for now() )

Regards,

Michael Glaesemann
grzm myrealbox com



pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Create interval using column value?
Next
From: Larry Lennhoff
Date:
Subject: Re: Create interval using column value?