Temporal query question

From: "Stefano Bonnin" <stefano(dot)bonnin(at)comai(dot)to>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Temporal query question
Date: 2004-11-30 10:30:16
Message-ID: 006001c4d6c7$955fdc60$0501a8c0@comai04
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

I have a "simple" question about the following temporal query with "interval" operator:

can I define a query of this type?

select myfield,numeric_field from mytable where temporal_attribute < temporal_attribute - interval numeric_field || ' days'

obviously this syntax is wrong.
In other words, is there a way to define a query with a interval operator with variable argument?
Thanks
Stefano

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joolz 2004-11-30 10:31:18 Re: change natural column order
Previous Message deepthi 2004-11-30 10:29:15 Maximum limit on int in plpgsql