On 1/29/20, Markus Winand <[email protected]> wrote:
> Hi!
>
> I think there might be a glitch in the way SQLite 3.31.x derives the
> collation information from the expression of a generated column.
I think the current behavior is correct.
If you want a column to have a non-standard collating sequence, you
should add a COLLATE constraint to that column definition. The fact
that there is a COLLATE operator on the expression that determines the
value of that column seems irrelevant.
Consider this:
CREATE TABLE t1(a TEXT DEFAULT('xyzzy' COLLATE nocase));
Would you expect the COLLATE operator in the DEFAULT clause to change
the collating sequence associated with column a? Why should a
GENERATED ALWAYS AS constraint work differently from a DEFAULT
constraint?
--
D. Richard Hipp
[email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users