| From: | "Dave Cramer" <Dave(at)micro-automation(dot)net> | 
|---|---|
| To: | "'Barry Lind'" <barry(at)xythos(dot)com> | 
| Cc: | <pgsql-jdbc(at)postgresql(dot)org> | 
| Subject: | Re: DatabaseMetaData.getTables() | 
| Date: | 2001-10-29 18:13:34 | 
| Message-ID: | 016b01c160a5$6c52f190$8201a8c0@inspiron | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-jdbc | 
Barry,
The spec is probably ambiguous about this. The way everyone uses the
getters/setters is to get, and set an object into the db. I doubt there
is anything in the spec stopping us from retrieving an arbitrary column
as a byte[].
I see this as being innocuous. The user would normally set/get any
object using the appropriate setter, and if we allow a user to retrive
any object as a byte[] then it's just 'extra' functionality.
Of course we could just make this an internal driver method as well
Thanks for taking care of it,
Dave
-----Original Message-----
From: Barry Lind [mailto:barry(at)xythos(dot)com] 
Sent: October 29, 2001 1:51 PM
To: Dave(at)micro-automation(dot)net
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: DatabaseMetaData.getTables()
Dave,
I will look into this.  I will check the jdbc spec to see what it says 
should happen.  Since it was my getBytes() changes that broke this, I 
will take responsibility for fixing.
thanks,
--Barry
Dave Cramer wrote:
> It appears the getBytes was previously being used to return a byte 
> array of any arbitrary column.
> 
> Fixes for blobs seem to have broken this. The question is as Jason 
> pointed out which do we fix.
> 
> It doesn't seem unreasonable to be able to return a byte array for any
> arbitray column. On the other hand is this the intended use?
> 
> Dave
> 
> -----Original Message-----
> From: pgsql-jdbc-owner(at)postgresql(dot)org 
> [mailto:pgsql-jdbc-owner(at)postgresql(dot)org] On Behalf Of Jason Davies
> Sent: October 27, 2001 8:26 PM
> To: pgsql-jdbc(at)postgresql(dot)org
> Subject: [JDBC] DatabaseMetaData.getTables()
> 
> 
> Hi,
> 
> There seems to be a problem with DatabaseMetaData.getTables() when I 
> do the following:
> 
> ResultSet R=conn.getMetaData().getTables(null, null, "%", null);
> 
> It throws a NullPointerException:
> 
> java.lang.NullPointerException
> 	at 
> org.postgresql.jdbc2.DatabaseMetaData.getTables(DatabaseMetaData.java:
> 17
> 32)
> 	at Test.main(Test.java:66)
> 
> Looking at the source, ResultSet.getBytes() is called and it returns 
> null, causing this exception to be thrown. However I can use
> ResultSet.getString() without a problem. I'm using 7.1.3 at the 
> moment. Does ResultSet.getBytes() need to be fixed or should 
> getTables() be modified?
> 
> I'd be grateful for any insights. Or you can just tell me to use the 
> latest cvs version of PostgreSQL :) What is the consensus on 
> supporting older versions, will you phase out old code when 7.2 comes 
> out?
> 
> 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Isaac Sparrow | 2001-10-29 18:17:09 | Re: Error: ClassNotFoundException | 
| Previous Message | Nick Fankhauser | 2001-10-29 18:11:22 | Re: Urgent problems with my conection |