Re: Boolean: DatabaseMetaData.getColumns - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: Boolean: DatabaseMetaData.getColumns
Date
Msg-id 20031129082713.GB2449@opencloud.com
Whole thread Raw
In response to Boolean: DatabaseMetaData.getColumns  (Adrian Frick <mbch67@yahoo.com>)
List pgsql-jdbc
On Wed, Nov 26, 2003 at 01:01:12AM -0800, Adrian Frick wrote:
> Configuration:
> - PostgreSQL 7.4
>  - JDBC 7.4 beta3 build 209
>
> Test case:
> 1. Created a table column of type BOOLEAN
> 2. Retrieved column metadata using
>    - Class:  DatabaseMetaData
>    - Method: getColumns
> 3. Got the following values
>    - DATA_TYPE: -7 (java.sql.Types.BIT)
>    - TYPE_NAME: bool
>
> Error description:
> DATA_TYPE should be 16 (java.sql.Types.BOOLEAN)
> instead of -7, wenn TYPE_NAME is 'bool'

Types.BOOLEAN is an alias for Types.BIT according to the JDBC spec. Seems
valid to return BIT for a boolean column to me, especially as BOOLEAN isn't
present in earlier JDBC versions.

-O

pgsql-jdbc by date:

Previous
From: "Nick Fankhauser"
Date:
Subject: Re: JDBC driver for OSx
Next
From: Jim Wright
Date:
Subject: Re: UNICODE and JDBC Driver