On 17 May 2018, at 4:32pm, heribert <herib...@scharnagl.com> wrote:

> 'alter table Inbox add column WasSend boolean default FALSE'
> [...]
> 
> So i looked into the SQLite keyword list... but i didn't find neither FALSE 
> nor TRUE. So, why did the FALSE work with 3.20?

It wasn't doing what you thought it was doing.

SQLite version 3.19.3 2017-06-27 16:48:08
sqlite> create table tt (tcolumn TEXT, WasSend boolean default FALSE);
sqlite> PRAGMA table_info(tt);
0|tcolumn|TEXT|0||0
1|WasSend|boolean|0|FALSE|0
sqlite> INSERT INTO tt DEFAULT VALUES;
sqlite> SELECT * FROM tt;
|FALSE
sqlite> SELECT tcolumn,typeof(tcolumn),WasSend,typeof(WasSend) FROM tt;
|null|FALSE|text

The WasSend column had an affinity of NUMERIC, but it was putting the string 
'FALSE' into it.  This works only because a backward compatibility requirement 
made SQLite recognise the FALSE as a string when it couldn't figure out what 
else it could be.

I do think you've spotted a bug in 3.23 but I'll wait for one of the 
development team to tell you for sure.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to