[sqlite] `UNIQUE` constraint allows multiple NULL: is this expected?

2016-01-27 Thread Yannick DuchĂȘne
On Wed, 27 Jan 2016 14:38:41 -0500 Richard Hipp wrote: > > See https://www.sqlite.org/nulls.html > The most important part to me, is this one: > The fact that NULLs are distinct for UNIQUE columns but are indistinct for > SELECT DISTINCT and UNION continues to be puzzling. It seems that

[sqlite] `UNIQUE` constraint allows multiple NULL: is this expected?

2016-01-27 Thread Yannick DuchĂȘne
On Wed, 27 Jan 2016 14:17:49 -0500 Igor Tandetnik wrote: > On 1/27/2016 2:10 PM, Yannick Duch?ne wrote: > > `UNIQUE` constraint allows multiple NULL: is this expected? > > http://www.sqlite.org/lang_createtable.html > "For the purposes of UNIQUE constraints, NULL values are considered >

[sqlite] `UNIQUE` constraint allows multiple NULL: is this expected?

2016-01-27 Thread Yannick DuchĂȘne
Hi people out there, I initially subscribed for another question (which I will post later), when I came to something which surprised me. Given this: CREATE TABLE test (value TEXT UNIQUE) On this: INSERT INTO test (value) VALUES('A'); INSERT INTO test (value) VALUES('A') ? the

[sqlite] `UNIQUE` constraint allows multiple NULL: is this expected?

2016-01-27 Thread Richard Hipp
On 1/27/16, Yannick Duch?ne wrote: > On Wed, 27 Jan 2016 14:17:49 -0500 > Igor Tandetnik wrote: > >> On 1/27/2016 2:10 PM, Yannick Duch?ne wrote: >> > `UNIQUE` constraint allows multiple NULL: is this expected? >> >> http://www.sqlite.org/lang_createtable.html >> "For the purposes of UNIQUE

[sqlite] `UNIQUE` constraint allows multiple NULL: is this expected?

2016-01-27 Thread Igor Tandetnik
On 1/27/2016 2:10 PM, Yannick Duch?ne wrote: > `UNIQUE` constraint allows multiple NULL: is this expected? http://www.sqlite.org/lang_createtable.html "For the purposes of UNIQUE constraints, NULL values are considered distinct from all other values, including other NULLs." I'm reasonably, but