Re: DBD::Pg ... how would I format this prepare? - Mailing list pgsql-sql

From Harald Fuchs
Subject Re: DBD::Pg ... how would I format this prepare?
Date
Msg-id pulkq9hjw9.fsf@srv.protecting.net
Whole thread Raw
In response to DBD::Pg ... how would I format this prepare?  ("Marc G. Fournier" <scrappy@postgresql.org>)
List pgsql-sql
In article <20060726182806.A1188@ganymede.hub.org>,
"Marc G. Fournier" <scrappy@postgresql.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



pgsql-sql by date:

Previous
From: "Aaron Bono"
Date:
Subject: Re: Triggers using PL/pgSQL
Next
From: John DeSoi
Date:
Subject: Re: Triggers using PL/pgSQL