On 6 Sep 2017, at 11:31pm, Cecil Westerhof <cldwester...@gmail.com> wrote:

> 2017-09-07 0:20 GMT+02:00 Richard Hipp <d...@sqlite.org>:
> 
>> On 9/6/17, Cecil Westerhof <cldwester...@gmail.com> wrote:
>> 
>>> Maybe this is correct, but it is certainly confusing.
>> 
>> The constraint check occurs before the implicit conversion.
> 
> ​Should that not be the other way around?

This is an important point.  But I’d say not.  Constraint checks are there to 
make sure that the programmers are doing the Right Thing, not that the DBMS is 
doing the Right Thing.  So it’s the source value which is checked, not the 
value stored in the database.

To do it the other way around suggests that SQLite needs to check that SQLite 
is doing the Right Thing, which would be a waste of cycles, and a sign that the 
developers need to consult a psychiatrist.

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

Reply via email to