Home » U++ Library support » U++ SQL » PostgreSql does not handle BOOL correctly
Re: PostgreSql does not handle BOOL correctly [BUG+PATCH] [message #60218 is a reply to message #60199] |
Fri, 20 October 2023 09:41   |
 |
mirek
Messages: 14267 Registered: November 2005
|
Ultimate Member |
|
|
I think this is a bit of misunderstanding. Schema BOOL is defined as char(1), for better or worse, and thus follows text operations rules.
The reason for this is that we try to be "universal" and not all RDBMS support bool columns, so char(1) is the safe bet.
Maybe we should introduce another column type, defined only when possible, which would only work with some databases.
But then again, as long as you know that BOOL is actually char(1), it is trivial to adjust your SQL coding with the benefit of begin more RDBMS agnostic (arguably small, but hey - I really did have a well paid job converting some of my apps to use MSSQL instead of Oracle, thanks to this, it was quite easy).
(BTW, you made me check whether the documentation mentions it; it does: https://www.ultimatepp.org/src$Sql$sch_en-us.html)
|
|
|
Goto Forum:
Current Time: Thu Aug 21 18:20:18 CEST 2025
Total time taken to generate the page: 0.00814 seconds
|