Details
-
Bug
-
Resolution: Fixed
-
High
-
None
-
None
-
None
Description
While is is ok with some RDBMs to use the result of a binary operator (&) as a boolean value like:
WHERE (lang_mask & 4)
this is unfortunately not portable, especially on PostgreSQL which doesn't convert integers as booleans.
For this reason, the portable way to do this is:
WHERE (lang_mask & 4) > 0
Attachments
Issue Links
- discovered while testing
-
EZP-20727 Database error when deleting content with the API in PostgreSQL
- Closed