Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
mirek is currently offline  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)
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: SqlPerformScript bug: Not doing anything if script starts with "BEGIN;" and ends with "END;"
Next Topic: Sqlite3 update
Goto Forum:
  


Current Time: Thu Aug 21 16:26:50 CEST 2025

Total time taken to generate the page: 0.06546 seconds