https://bugs.freedesktop.org/show_bug.cgi?id=69554

--- Comment #5 from Lionel Elie Mamane <[email protected]> ---
(In reply to Matthew Francis from comment #4)
> The behaviour changed as of the below commit
> 
> was the change in the behaviour of the attached
> database intended? Thanks
> 
> 
> commit 2bd856e643ef526c1283475c19cd355f7ef840f4
> Author: David Ostrovsky <[email protected]>
> Date:   Mon Feb 4 11:12:57 2013 +0100
> 
>     ORowSetValue: clean up sign/unsigned union member
>     
>     Also switch BOOLEAN constructor from sal_Bool to bool.
> [...]
>     For authorship/copyright purposes, this patch is a cooperation between
>      Lionel Elie Mamane <[email protected]>
>     and
>      David Ostrovsky <[email protected]>

The change of behaviour was not intended per se in this commit, but it was
noticed (in the context of checkboxes, see
https://wiki.documentfoundation.org/ReleaseNotes/4.2#Base ) and it was kept
since it corresponds to the SQL-standard way: a boolean is either true or
false, and has nothing to do with any integer values (although an *explicit*
cast can be added)...

(In reply to robert from comment #0)
> If you start a query and want to select the "Swimmer", the following works:
> SELECT "Name", "Swimmer" FROM "Table" WHERE "Swimmer" = 1

This is a deviation from the standard (or let's say an extension) by HSQLDB and
undoubtedly others. I very much prefer that LibreOffice not rely on it, and "in
exchange" works with databases that adhere more strictly to the SQL standard
(such as e.g. PostgreSQL). I'm sorry for the incompatible behaviour change, but
it is going in the right direction.

You'll notice that even in 4.0, if you go to Tools / SQL, enable

  Show output of "select" statements

and then execute
  SELECT * FROM "Table"

the boolean field shows as "true" or "false", not as "1" or "0".

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to