On Wed, Oct 30, 2019 at 8:32 AM Keith Medcalf <kmedc...@dessus.com> wrote:
> On Tuesday, 29 October, 2019 23:05, Simon Slavin <slav...@bigfraud.org> > wrote: > >On 30 Oct 2019, at 3:58am, Keith Medcalf <kmedc...@dessus.com> wrote: > > >> Before you change anything, I think that is incorrect for the various > >> datetime functions. I think they SHOULD be permitted in CHECK > >> constraints and in generated always columns, whether those are stored or > >> virtual, whether or not parameters are given since they are constant. > >> They should not be permitted in indexes however unless they are pure > >> (deterministic). > > > But can SQLite tell the difference at that stage ? For instance, > > Personally, I do not see a problem with permitting them to be used > anywhere EXCEPT in an index expression. > +1. I completely agree with Keith, and the use-cases he outlined are great examples of enforcing business logic using CHECK constraints. I especially like the fact one cannot alter these stored generated values, again adding a level of integrity to the DB. --DD _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users