Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-jdbc by date

Next:From: Oliver JowettDate: 2007-12-19 21:14:47
Subject: Re: TypeInfoCache
Previous:From: Daniel MigowskiDate: 2007-12-19 18:17:46
Subject: Re: TypeInfoCache

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group