pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Matt Magoffin <postgresql.org@msqr.us>
To: pgsql-jdbc@postgresql.org
Subject: Re: setting PreparedStatement parameter using "at time zone interval ?"
Date: Thu, 20 Dec 2007 08:06:39 +1300 (NZDT)
Message-ID: <49212.192.168.1.108.1198091199.squirrel@msqr.us> (raw)
In-Reply-To: <23204.1198079325@sss.pgh.pa.us>
References: <55255.192.168.1.108.1198055905.squirrel@msqr.us>
	<23204.1198079325@sss.pgh.pa.us>

> 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@




view thread (3+ messages)

Message-ID: <49212.192.168.1.108.1198091199.squirrel@msqr.us>
Permalink:  ../49212.192.168.1.108.1198091199.squirrel@msqr.us/
Also on:    postgresql.org/message-id/49212.192.168.1.108.1198091199.squirrel@msqr.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: postgresql.org@msqr.us
  Subject: Re: setting PreparedStatement parameter using "at time zone interval ?"
  In-Reply-To: <49212.192.168.1.108.1198091199.squirrel@msqr.us>
  References: <55255.192.168.1.108.1198055905.squirrel@msqr.us> <23204.1198079325@sss.pgh.pa.us> <49212.192.168.1.108.1198091199.squirrel@msqr.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox