Re: PreparedStatement error upon trying to set a '?' after interval keyword - Mailing list pgsql-jdbc

From Craig Ringer
Subject Re: PreparedStatement error upon trying to set a '?' after interval keyword
Date
Msg-id 53EA1050.2060504@2ndquadrant.com
Whole thread Raw
In response to Re: PreparedStatement error upon trying to set a '?' after interval keyword  (Sehrope Sarkuni <sehrope@jackdb.com>)
List pgsql-jdbc
On 08/12/2014 08:22 PM, Sehrope Sarkuni wrote:
> I'd probably use the ::interval cast syntax though, so something like:
> checkin_time > (CURRENT_DATE - (? * '1 day'::interval))

I only used

   INTERVAL '1' DAY

because AFAIK that's the standard form. Given the miserable support for
intervals in other RDBMSes, it doesn't matter much in practice.

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-jdbc by date:

Previous
From: Sehrope Sarkuni
Date:
Subject: Re: PreparedStatement error upon trying to set a '?' after interval keyword
Next
From: Barry Bell
Date:
Subject: [ODBC] BIRT report opening multiple connections