[QGIS-Developer] Generated columns in PostgreSQL 12

Stefan Steiger Steiger at cor-management.ch
Wed Jul 10 08:30:44 PDT 2019


One thing it potentially means is auto-generated insert/update-scripts fail, because they insert all fields, including computed columns.
Don’t know how PostgreSQL-12 handles inserts on computed/generated columns though, this is speaking from experience with SQL-server computed columns.
It’s not sure PostgreSQL throws on INSERTs/UPDATEs statements on generated columns though, so theoretically, this column could actually be mutable.
If this feature does nothing more than adding a hidden insert-update trigger, then this might be so, and that wouldn’t necessarily be bad.


Von: QGIS-Developer [mailto:qgis-developer-bounces at lists.osgeo.org] Im Auftrag von Andreas Neumann
Gesendet: Mittwoch, 10. Juli 2019 16:22
An: QGIS Developers List <qgis-developer at lists.osgeo.org>
Betreff: [QGIS-Developer] Generated columns in PostgreSQL 12


Hi,

Here is a quite interesting new feature in PostgreSQL 12:

https://www.2ndquadrant.com/en/blog/generated-columns-in-postgresql-12/

It is similar to virtual columns in QGIS.

I suspect that users will want to use that new column type. What does this mean for QGIS? I guess QGIS will have to detect this new column type in the future and mark it as "immutable". So other columns are read/write, but generated columns will be read only. Does QGIS already support a concept like this where some columns are read/write and others not?

Greetings,

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20190710/db3471e3/attachment.html>


More information about the QGIS-Developer mailing list