Re: interval +variable - Mailing list pgsql-sql

From Bruno Wolff III
Subject Re: interval +variable
Date
Msg-id 20050309141908.GA32013@wolff.to
Whole thread Raw
In response to interval +variable  ("Fatih Cerit" <fatih@intersan.com.tr>)
List pgsql-sql
On Wed, Mar 09, 2005 at 10:58:05 +0200, Fatih Cerit <fatih@intersan.com.tr> wrote:
> Dear all
> 
> Is there anyone at there who knows howto use dateadd in pgsql. I have a 
> problem in my function that is like this ;
> 
> Select into futuredate now() + interval '30 days';  <- this is ok
> but how can I use a variable intead of '30 days'    :(

A better solution may to be to use the date type instead of the timestamp type.
Then you can just add an integer number to the date. You also don't have
to worry about daylight savings time changes.


pgsql-sql by date:

Previous
From: lucas@presserv.org
Date:
Subject: Table like a field
Next
From: Bruno Wolff III
Date:
Subject: Re: order by question