From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: Fatih Cerit <fatih@intersan.com.tr>
Cc: pgsql-sql@postgresql.org
Subject: Re: plpgsql & date-time functions
Date: Sun, 13 Mar 2005 18:33:41 -0800 (PST)
Message-ID: <20050313183247.J69508@megazone.bigpanda.com> (raw)
In-Reply-To: <d0k4vn$1dmm$1@news.hub.org>
References: <d0k4vn$1dmm$1@news.hub.org>
On Tue, 8 Mar 2005, Fatih Cerit wrote:
> I have a function and I want to update a table's two rows but having problem
> with plpgsql & date-time functions. First field of the table must be now()
> this is ok.. but the second field must be now() + '60 days' if the query
> like this : SELECT INTO to_day now() + interval '60 days' ; it works but if
> I use variable instead of '60 days' it doesn't work. And I must use
> variable....
If you want a variable number of days, something like
now() + variable * interval '1 day'
will probably work.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: sszabo@megazone.bigpanda.com, fatih@intersan.com.tr
Subject: Re: plpgsql & date-time functions
In-Reply-To: <20050313183247.J69508@megazone.bigpanda.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox