Re: DBD::Pg ... how would I format this prepare?

From: Harald Fuchs <hf0731x(at)protecting(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: DBD::Pg ... how would I format this prepare?
Date: 2006-07-31 15:30:14
Message-ID: pulkq9hjw9.fsf@srv.protecting.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

In article <20060726182806(dot)A1188(at)ganymede(dot)hub(dot)org>,
"Marc G. Fournier" <scrappy(at)postgresql(dot)org> writes:

> I need to do:

> NOW() + '2 day'::interval

> where 2 is a variable ...

> if I do:

> NOW() + '? day'::interval

> it, of course, takes the ? as a literal ... so is there some way I can
> do this such that I can do the placeholder?

How about the following?

now() + ? * '1 day'::interval

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Ken Hill 2006-07-31 15:47:50 Re: Triggers using PL/pgSQL
Previous Message Aaron Bono 2006-07-31 14:59:22 Re: Triggers using PL/pgSQL