pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: Dave Cramer <pg@fastcrypt.com>
Cc: Thor Michael Støre <thormichael@gmail.com>
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Re: Finding exact column type via java.sql.ResultSetMetaData
Date: Thu, 14 Feb 2013 12:11:31 -0500 (EST)
Message-ID: <alpine.BSO.2.00.1302141206480.23041@leary.csoft.net> (raw)
In-Reply-To: <CADK3HHLr4v2SCQ-xUv0bEXsPKsvmn-r+NZjTy6Sc1EmoRcMzow@mail.gmail.com>
References: <3A2E457A-47D7-44B8-9D2F-5865D24C32DC@gmail.com>
	<CADK3HHLr4v2SCQ-xUv0bEXsPKsvmn-r+NZjTy6Sc1EmoRcMzow@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



view thread (3+ messages)

Message-ID: <alpine.BSO.2.00.1302141206480.23041@leary.csoft.net>
Permalink:  ../alpine.BSO.2.00.1302141206480.23041@leary.csoft.net/
Also on:    postgresql.org/message-id/alpine.BSO.2.00.1302141206480.23041@leary.csoft.net

 · 

reply

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: books@ejurka.com, pg@fastcrypt.com, thormichael@gmail.com
  Subject: Re: Finding exact column type via java.sql.ResultSetMetaData
  In-Reply-To: <alpine.BSO.2.00.1302141206480.23041@leary.csoft.net>
  References: <3A2E457A-47D7-44B8-9D2F-5865D24C32DC@gmail.com> <CADK3HHLr4v2SCQ-xUv0bEXsPKsvmn-r+NZjTy6Sc1EmoRcMzow@mail.gmail.com> <alpine.BSO.2.00.1302141206480.23041@leary.csoft.net>

* 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