SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
[SA 7.2.338 Pro] Postgresql - boolean

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
[SA 7.2.338 Pro] Postgresql - boolean
Author Message
michalk



Joined: 29 Aug 2014
Posts: 211

Post [SA 7.2.338 Pro] Postgresql - boolean Reply with quote
Boolean values are represented by integers values (0 and 1) in data preview grid. I would expect true/false or t/f etc

Speaking about data grids, I suggest to add datatype name to column headers

with regards
Wed Jun 10, 2015 4:55 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
Boolean values are internally represented as you say t/f or as a number of other databases as 1/0 and bit data types. SQL Assistant currently uses 1/0 as a presentation method for such values across all database types.

Regarding data types. Please mouse over column headers. You will see their data types and nullability attributes in the mouse-over hints.
Wed Jun 10, 2015 11:31 pm View user's profile Send private message
michalk



Joined: 29 Aug 2014
Posts: 211

Post Reply with quote
I would like to see an option to change representation of boolean then.

with regards
Thu Jun 11, 2015 9:33 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
That seems to be a PG only proprietary option. In all database server types the internal value for Boolean data values is either a BIT or TINYINT data type represented by 1/0 values. PG does internally the same thing, but in the SQL code it allows aliasing it to a bunch of values: TRUE, 't', 'true', 'y', 'yes', 'on' '1' - all of which are the same as 1, meaning a "true" state, while any of the following values are the same as 0, meaning a "false" state: FALSE, 'f', 'false', 'n', 'no', 'off', '0'

I can submit an enhancement request to allow alternative display of BIT / BOOL / BOOLEAN values.
Thu Jun 11, 2015 10:03 am View user's profile Send private message
michalk



Joined: 29 Aug 2014
Posts: 211

Post Reply with quote
Yeah, I would be grateful for that.

Point is, that looking at result grid, true/false value makes automatically obvious that the column cannot have other values.
If you look at column with 0 and 1 values, you can assume that there can be another numbers. So, showing boolean with true/false values is a way to improve user experience.

thank you.
Thu Jun 11, 2015 10:18 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.