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
PostgreSql does not handle BOOL correctly [message #59950] Sun, 11 June 2023 17:12 Go to previous message
omari is currently offline  omari
Messages: 266
Registered: March 2010
Experienced Member
Test case:

with this schema:
TABLE_(MY_TABLE)
   INT_   (ID) PRIMARY_KEY
   BOOL_  (IS_OK)
END_TABLE


this code:
SqlStatement s = Select(ID).From(MY_TABLE).WHERE(IS_OK == true);
LOG(s.Get(PGSQL));


print :
select ID from MY_TABLE where IS_OK = 1


PostgreSql does not accept this sql statement.

the correct one is:
select ID from MY_TABLE where IS_OK = '1'


index.php?t=getfile&id=6817&private=0


regards
omari.
 
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;"
Goto Forum:
  


Current Time: Mon Jun 10 12:33:54 CEST 2024

Total time taken to generate the page: 0.02143 seconds