On Wed, Oct 30, 2019 at 11:26 AM Richard Hipp <d...@sqlite.org> wrote:

> On 10/29/19, 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).
>
> i believe the purpose of a CHECK constraint is declare an eternal
> truth about the database content, not merely something that was true
> at the point in time when the content was first inserted.  Am I wrong?
>

That makes sense too, indeed. Basically an "invariant" as we often say.

Yet I see Keith's use-cases as compelling enough to leave that decision to
the user,
rather than the implementation making it for us. Or perhaps you think
triggers should
be used instead, for those use cases? --DD
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to