I have been trying out generated column support in the 3.31.0 prerelease.
Thank you for adding such a useful feature!

When I create a trigger for an update of a generated column the trigger is
successfully created but it never fires. I could not find any mention in
the draft documentation of generated columns in the context of triggers, so
I'm not sure what should be expected.

Here is an example of what I tried:

sqlite> .version
SQLite 3.31.0 2019-11-19 21:22:16
a48f6e17599d7ec794cfcd60858d6a69cf05caaae9321048b111fedd86a3b5b2
zlib version 1.2.11
clang-11.0.0
sqlite> create table t0(a,b,c as (a+b) stored);
sqlite> create table t1(k,v);
sqlite> create trigger trig1 after update of c on t0 begin insert into
t1(k,v) values ('c',new.c); end;
sqlite> insert into t0(a,b) values (1,2),(3,4);
sqlite> select * from t0;
1|2|3
3|4|7
sqlite> select * from t1;
sqlite>

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

Reply via email to