PreparedStatement syntax extensions?

From: Ian Pilcher <arequipeno(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: PreparedStatement syntax extensions?
Date: 2011-08-26 15:51:50
Message-ID: j38fen$jcc$1@dough.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

First off, I'm pretty much a noob with anything but very basic SQL and
JDBC, so apologies in advance if these are stupid questions ...

I am using the "WHERE foo = ANY (?)" syntax for my PreparedStatements to
avoid dynamically creating gigantic "IN (?, ?, ...)" statements. After
much searching, I found it syntax in this thread:

http://archives.postgresql.org/pgsql-jdbc/2011-04/msg00019.php

With all of my Google-fu, I have been unable to find any other mention
of this syntax anywhere else on the Interwebs, which brings me to
question #1:

Is this construct documented anywhere?

A follow-up post contains this PreparedStatement syntax:

SELECT ?::int[]

Is this specifying a type for the PreparedStatement parameter? If not,
what is it doing?

And again, is there any documentation of this syntax?

Thanks!

--
========================================================================
Ian Pilcher arequipeno(at)gmail(dot)com
"If you're going to shift my paradigm ... at least buy me dinner first."
========================================================================

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Maciek Sakrejda 2011-08-26 16:49:12 Re: PreparedStatement syntax extensions?
Previous Message Stefan Reiser 2011-08-26 14:19:26 Exception when updating ResultSet