pgjdbc/pgjdbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feed[pgjdbc/pgjdbc] issue #367: BOOLEAN field treated as BIT
8+ messages / 5 participants
[nested] [flat]
* [pgjdbc/pgjdbc] issue #367: BOOLEAN field treated as BIT
@ 2015-09-07 11:43 "gtors (@gtors)" <[email protected]>
0 siblings, 0 replies; 8+ messages in thread
From: gtors (@gtors) @ 2015-09-07 11:43 UTC (permalink / raw)
To: pgjdbc/pgjdbc <[email protected]>
This issue cause bugs in third-party libraries. For example: [stackoverflow question](https://stackoverflow.com/questions/26298295/unneccessary-database-changeset-related-to-boolean-afte...)
The root of the evil consists in [TypeInfoCache.java#L87](https://github.com/pgjdbc/pgjdbc/blob/master/org/postgresql/jdbc2/TypeInfoCache.java#L87)
I know it was for backward compatibility, but please make it configurable at least.
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: [pgjdbc/pgjdbc] issue #367: BOOLEAN field treated as BIT
@ 2015-09-07 21:03 "davecramer (@davecramer)" <[email protected]>
6 siblings, 0 replies; 8+ messages in thread
From: davecramer (@davecramer) @ 2015-09-07 21:03 UTC (permalink / raw)
To: pgjdbc/pgjdbc <[email protected]>
I'm looking at when this was changed and AFAICT it hasn't. This has been like this for a while ?Certainly before hibernate changed their code last
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: [pgjdbc/pgjdbc] issue #367: BOOLEAN field treated as BIT
@ 2018-11-07 13:12 "chris-baynes (@chris-baynes)" <[email protected]>
6 siblings, 0 replies; 8+ messages in thread
From: chris-baynes (@chris-baynes) @ 2018-11-07 13:12 UTC (permalink / raw)
To: pgjdbc/pgjdbc <[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?
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: [pgjdbc/pgjdbc] issue #367: BOOLEAN field treated as BIT
@ 2018-11-07 13:25 "davecramer (@davecramer)" <[email protected]>
6 siblings, 0 replies; 8+ messages in thread
From: davecramer (@davecramer) @ 2018-11-07 13:25 UTC (permalink / raw)
To: pgjdbc/pgjdbc <[email protected]>
@chris-baynes
Someone is always on the wrong side of an opinion... I'm loathe to change it permanently but could be convinced to make it configurable.
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: [pgjdbc/pgjdbc] issue #367: BOOLEAN field treated as BIT
@ 2023-01-04 17:49 "vintop95 (@vintop95)" <[email protected]>
6 siblings, 0 replies; 8+ messages in thread
From: vintop95 (@vintop95) @ 2023-01-04 17:49 UTC (permalink / raw)
To: pgjdbc/pgjdbc <[email protected]>
A framework I'm working on infers the type of a column from a select query with jdbc, and this problem makes it impossible for boolean types to be inferred correctly.
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: [pgjdbc/pgjdbc] issue #367: BOOLEAN field treated as BIT
@ 2023-01-05 13:56 "davecramer (@davecramer)" <[email protected]>
6 siblings, 0 replies; 8+ messages in thread
From: davecramer (@davecramer) @ 2023-01-05 13:56 UTC (permalink / raw)
To: pgjdbc/pgjdbc <[email protected]>
a PR would be useful here
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: [pgjdbc/pgjdbc] issue #367: BOOLEAN field treated as BIT
@ 2025-09-12 20:53 "vwassan (@vwassan)" <[email protected]>
6 siblings, 0 replies; 8+ messages in thread
From: vwassan (@vwassan) @ 2025-09-12 20:53 UTC (permalink / raw)
To: pgjdbc/pgjdbc <[email protected]>
> a PR would be useful here
@davecramer Could you take a look at https://github.com/pgjdbc/pgjdbc/pull/3796?
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: [pgjdbc/pgjdbc] issue #367: BOOLEAN field treated as BIT
@ 2025-09-12 21:45 "davecramer (@davecramer)" <[email protected]>
6 siblings, 0 replies; 8+ messages in thread
From: davecramer (@davecramer) @ 2025-09-12 21:45 UTC (permalink / raw)
To: pgjdbc/pgjdbc <[email protected]>
already did
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2025-09-12 21:45 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-09-07 11:43 [pgjdbc/pgjdbc] issue #367: BOOLEAN field treated as BIT "gtors (@gtors)" <[email protected]>
2015-09-07 21:03 ` "davecramer (@davecramer)" <[email protected]>
2018-11-07 13:12 ` "chris-baynes (@chris-baynes)" <[email protected]>
2018-11-07 13:25 ` "davecramer (@davecramer)" <[email protected]>
2023-01-04 17:49 ` "vintop95 (@vintop95)" <[email protected]>
2023-01-05 13:56 ` "davecramer (@davecramer)" <[email protected]>
2025-09-12 20:53 ` "vwassan (@vwassan)" <[email protected]>
2025-09-12 21:45 ` "davecramer (@davecramer)" <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox