I'm really excited for this, there are so many times that I override backend code to pre-compute a column and then save it, the ability to just define a generated value that is indexable that Postgres can keep up to date without triggers is really exciting.
Note that that often will be doable just as an expression index. Say CREATE INDEX foo ON bar(my_function(cola, colb)); which then can answer questions like SELECT * FROM bar WHERE my_function(cola, colb) = 'zaphod'; if my_function is immutable. That has the advantage of not needing additional space in the table, just the index.
Of course, there are plenty cases where one still wants to have generated columns.
2 comments
[ 2.9 ms ] story [ 16.0 ms ] threadOf course, there are plenty cases where one still wants to have generated columns.