pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
PreparedStatement.getParameterMetaData
2+ messages / 2 participants
[nested] [flat]

* PreparedStatement.getParameterMetaData
@ 2005-11-20 16:49 Aaron Mulder <ammulder@alumni.princeton.edu>
  2005-11-21 00:24 ` Re: PreparedStatement.getParameterMetaData Oliver Jowett <oliver@opencloud.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Aaron Mulder @ 2005-11-20 16:49 UTC (permalink / raw)
  To: pgsql-jdbc

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: PreparedStatement.getParameterMetaData
  2005-11-20 16:49 PreparedStatement.getParameterMetaData Aaron Mulder <ammulder@alumni.princeton.edu>
@ 2005-11-21 00:24 ` Oliver Jowett <oliver@opencloud.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Oliver Jowett @ 2005-11-21 00:24 UTC (permalink / raw)
  To: Aaron Mulder <ammulder@alumni.princeton.edu>; +Cc: pgsql-jdbc

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2005-11-21 00:24 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-11-20 16:49 PreparedStatement.getParameterMetaData Aaron Mulder <ammulder@alumni.princeton.edu>
2005-11-21 00:24 ` Oliver Jowett <oliver@opencloud.com>

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