pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
From: chris-baynes (@chris-baynes) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: Re: [pgjdbc/pgjdbc] issue #367: BOOLEAN field treated as BIT
Date: Wed, 07 Nov 2018 13:12:00 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

I've recently encountered this problem when querying boolean columns. 
There's some logic in our code that says if the column type is `bit` (which is what the driver reports for boolean cols) then get the value using `getByte`. This throws an exception when the underlying column is actually a boolean: 
```
org.postgresql.util.PSQLException: Bad value for type byte : f
```
It works as expected if the column is really `bit`.
Is there anything that can be done on the driver side? Or does this have to remain as is due to backwards compatibility?

view thread (8+ messages)  latest in thread

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 using the --to and --cc options:
  reply via email

  To: github://pgjdbc/pgjdbc
  Cc: [email protected], [email protected]
  Subject: Re: [pgjdbc/pgjdbc] issue #367: BOOLEAN field treated as BIT
  In-Reply-To: <<[email protected]>>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox