On Oct 29, 2019, at 7:20 AM, Simon Slavin <slav...@bigfraud.org> wrote:
> 
> <https://www.sqlite.org/draft/gencol.html>
> 
> OMG.  Much welcomed feature.

Yes, I can see immediate use for this.

One question I had after reading the draft doc is whether an 
application-defined SQLITE_DETERMINISTIC function can be used to compute a 
generated column.  My immediate use case for this feature would require logic 
I’d struggle to define in SQL, but which we already have logic for in C++.  
Indeed, I’d be using this feature to cache the results of that C++ code in the 
DB table, so it only needs to run when the source DB column changes.

>    ALTER TABLE ADD COLUMN cannot be used to add GENERATED ALWAYS … STORED 
> columns

The doc should explain why this restriction exists, given that SQLite does 
otherwise allow ALTER TABLE ADD COLUMN.

My first use of this feature will likely have me adding a STORED column to an 
existing table, so unless this restriction is lifted before I get around to 
using the new feature, I’ll be doing the old table migration dance.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to