Message-ID: From: "chris-baynes (@chris-baynes)" To: "pgjdbc/pgjdbc" Date: Wed, 07 Nov 2018 13:12:00 +0000 Subject: Re: [pgjdbc/pgjdbc] issue #367: BOOLEAN field treated as BIT In-Reply-To: References: List-Id: X-GitHub-Author-Login: chris-baynes X-GitHub-Comment-Id: 436617845 X-GitHub-Comment-Type: issue_comment X-GitHub-Issue: 367 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/367#issuecomment-436617845 Content-Type: text/plain; charset=utf-8 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?