Re: setting PreparedStatement parameter using "at time zone interval ?"

From: "Matt Magoffin" <postgresql(dot)org(at)msqr(dot)us>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: setting PreparedStatement parameter using "at time zone interval ?"
Date: 2007-12-19 19:06:39
Message-ID: 49212.192.168.1.108.1198091199.squirrel@msqr.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

> That might've worked back before the driver did real prepared
> statements. It's invalid syntax though, because typename before the
> constant works only for simple literal string constants. You got away
> with it when the driver interpolated parameter values into the query as
> string literals, but you can't do it anymore.
>
> ?::interval (or the full-blown CAST syntax) is the right way.
>
> See
> http://developer.postgresql.org/pgdocs/postgres/sql-syntax-lexical.html#SQL-SYNTAX-CONSTANTS
> particularly 4.1.2.5.

Thank you for the clarification.

-- m@

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2007-12-19 21:14:47 Re: TypeInfoCache
Previous Message Daniel Migowski 2007-12-19 18:17:46 Re: TypeInfoCache