Re: setting PreparedStatement parameter using "at time zone interval ?" - Mailing list pgsql-jdbc

From Matt Magoffin
Subject Re: setting PreparedStatement parameter using "at time zone interval ?"
Date
Msg-id 49212.192.168.1.108.1198091199.squirrel@msqr.us
Whole thread Raw
In response to Re: setting PreparedStatement parameter using "at time zone interval ?"  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@


pgsql-jdbc by date:

Previous
From: Daniel Migowski
Date:
Subject: Re: TypeInfoCache
Next
From: Oliver Jowett
Date:
Subject: Re: TypeInfoCache