Re: DatabaseMetaData.getTables()

From: Barry Lind <barry(at)xythos(dot)com>
To: Dave(at)micro-automation(dot)net
Cc: "'Jason Davies'" <jason(at)netspade(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: DatabaseMetaData.getTables()
Date: 2001-10-30 07:16:28
Message-ID: 3BDE53CC.5080202@xythos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

This should now be fixed in current sources. Thanks for finding and
reporting the problem.

--Barry

Dave Cramer wrote:

> Jason,
>
> Thanks, this won't quite work in the new code due to the test for server
> version 7.2, but will suffice for my current work.
>
> Dave
>
> -----Original Message-----
> From: Jason Davies [mailto:jason(at)netspade(dot)com]
> Sent: October 29, 2001 2:45 PM
> To: Dave Cramer
> Cc: pgsql-jdbc(at)postgresql(dot)org
> Subject: Re: [JDBC] DatabaseMetaData.getTables()
>
>
> Hi,
>
> Here is a diff that fixes ResultSet.getBytes() so that it returns a
> byte[] array but preserves the functionality for other objects.
>
> I also noticed that in Java 1.4, DatabaseMetaData.getTables() returns 10
> columns instead of the 5 in Java 1.3. Is this considered JDBC 3?
>
> Jason
>
> On Sun, Oct 28, 2001 at 10:56:30AM -0500, Dave Cramer wrote:
>
>>Well I think we can restore the orignal functionality of getBytes so
>>that it returns a byte array for other objects As long as we preserve
>>the functionality for bytea types, and LargeObjects
>>
>>Dave
>>
>>-----Original Message-----
>>From: Jason Davies [mailto:jason(at)netspade(dot)com]
>>Sent: October 28, 2001 8:34 AM
>>To: Dave Cramer
>>Cc: pgsql-jdbc(at)postgresql(dot)org
>>Subject: Re: [JDBC] DatabaseMetaData.getTables()
>>
>>
>>On Sun, Oct 28, 2001 at 07:14:42AM -0500, 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?
>>>
>>This is what the documentation says:
>>
>>public byte[] getBytes(int columnIndex)
>> throws SQLException
>>
>> Retrieves the value of the designated column in the current
>>row
>> of this ResultSet object as a byte array in the Java
>> programming language. The bytes represent the raw values
>> returned by the driver.
>>
>>It seems to imply that it _should_ return a byte array for any
>>arbitary column. But as usual, it's up to us to decide. I think it's
>>reasonable, since we are working with byte arrays in the code anyway.
>>
>>--
>>Jason Davies
>>
>>jason(at)netspade(dot)com
>>
>>
>>---------------------------(end of
>>broadcast)---------------------------
>>TIP 4: Don't 'kill -9' the postmaster
>>
>

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Juan José Antonio Lix 2001-10-30 10:14:18 Something unusual has occured to cause the driver to fail
Previous Message Nick Fankhauser 2001-10-30 01:23:53 Re: A newbie-oriented jdbc FAQ