Skip site navigation (1) Skip section navigation (2)

Boolean/Bit BUG with 7.4 JDBC Driver (build 213)

From: "j(dot)random(dot)programmer" <javadesigner(at)yahoo(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Boolean/Bit BUG with 7.4 JDBC Driver (build 213)
Date: 2004-04-07 22:08:04
Message-ID: 20040407220804.63851.qmail@web14203.mail.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Hi:

The latest JDBC driver (build 213) returns -7 for
the java.sql.Types value (obtained via DBMetaData,
getColumns() and then "DATA_TYPE"). I am not sure
if this has been a bug with all postgres JDBC drivers
or if this is some kinda regression bug.

-7 corresponds to a java.sql.Types.BIT and should
NOT be returned for a BOOLEAN type.

For a BOOLEAN type, a value of 16 should be returned
which corresponds to a java.sql.Types.BOOLEAN.

Please fix this ASAP, I am writing an advanced 
db abstraction layer and although both boolean/bit
are suggested by sun to map to a java boolean type, 
I still need to distinguish between bits and 
booleans in case the user wants a different mapping.

So: 16 for boolean, NOT -7 

Best regards,

--j



__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

Responses

pgsql-jdbc by date

Next:From: j.random.programmerDate: 2004-04-07 22:22:18
Subject: Column size BUG with text/bytea with 7.4 JDBC Driver (build 213)
Previous:From: Sica, David (David)Date: 2004-04-07 17:52:55
Subject: How to get Error Codes

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group