|
Home > Archive > PostgreSQL JDBC > November 2005 > PreparedStatement.getParameterMetaData
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
PreparedStatement.getParameterMetaData
|
|
| Aaron Mulder 2005-11-20, 11:25 am |
| 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.
Aaron
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql
.org so that your
message can get through to the mailing list cleanly
| |
| Oliver Jowett 2005-11-20, 8:24 pm |
| 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
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
|
|
|
|
|