From: Oliver Jowett <oliver@opencloud.com>
To: Aaron Mulder <ammulder@alumni.princeton.edu>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: PreparedStatement.getParameterMetaData
Date: Mon, 21 Nov 2005 13:24:37 +1300
Message-ID: <438113C5.4020301@opencloud.com> (raw)
In-Reply-To: <74e15baa0511200849x7cd6284dic27dbe95cca08bcf@mail.gmail.com>
References: <74e15baa0511200849x7cd6284dic27dbe95cca08bcf@mail.gmail.com>
Aaron Mulder wrote:
> I noticed yesterday that this does not seem to be working in the
> released drivers for 7.3 or 8.0. In the 7.3 build from the web site
> (no version in the name), I got something like an unimplemented
> exception. In the 8.0 build (314) I got a null. I haven't tried the
> 8.1 build as it seemed a little risky against an old 7.3 database.
As you discovered, older drivers don't implement the method at all. From
memory it was first implemented in the 8.0 driver.
However, the driver needs to be using the version 3 wire protocol to get
parameter metadata from the server. That protocol is only supported by
servers from 7.4 onwards, so you're out of luck against a 7.3 server.
It's not clear from the JDBC javadoc whether getParameterMetaData()
should return null, return a dummy object, or throw an exception when no
metadata is available. We currently return null. Returning a dummy
object seems hard since there is no way to return "unknown" across all
methods in the metadata interface.
-O
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: oliver@opencloud.com, ammulder@alumni.princeton.edu
Subject: Re: PreparedStatement.getParameterMetaData
In-Reply-To: <438113C5.4020301@opencloud.com>
References: <74e15baa0511200849x7cd6284dic27dbe95cca08bcf@mail.gmail.com> <438113C5.4020301@opencloud.com>
* 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