Re: Finding exact column type via java.sql.ResultSetMetaData - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Finding exact column type via java.sql.ResultSetMetaData
Date
Msg-id alpine.BSO.2.00.1302141206480.23041@leary.csoft.net
Whole thread Raw
In response to Re: Finding exact column type via java.sql.ResultSetMetaData  (Dave Cramer <pg@fastcrypt.com>)
List pgsql-jdbc

On Thu, 14 Feb 2013, Dave Cramer wrote:

> Yes, you are correct.  The backend does not provide that information
>

No, the backend does provide the OID of the returned column type.  So
internally we can tell the difference between the two types in different
schemas.  The issue is how to return this information to the user.
ResultSetMetaData.getColumnTypeName doesn't have a corresponding
getColumnTypeSchema so we'd have to qualify the returned value.  The
javadoc says we should in certain circumstances:

Returns:
    type name used by the database. If the column type is a user-defined
type, then a fully-qualified type name is returned.

I'm concerned that doing this would break things for more users than it
would help because different types with the same name is a rarity.  So
we'd probably need an option to enable/disable this.

Kris Jurka

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: Finding exact column type via java.sql.ResultSetMetaData
Next
From: dmp
Date:
Subject: Re: rounded brackets in prepared statement