[QGIS-Developer] WFS-T, postgis and triggers

Alessandro Pasotti apasotti at gmail.com
Thu Oct 29 07:07:19 PDT 2020


On Thu, Oct 29, 2020 at 2:59 PM Denis Rouzaud <denis.rouzaud at gmail.com> wrote:
>
> Hi all,
>
> I have a WFS-T layer with a Postgis DB behind it.
> On my table, I have an insert trigger (before insert) which sets a field.
> When I create a feature on this layer in QGIS, I don't get back the value of this field (I have to refresh the data, by re-opening QGIS for instance).
>
> Is this expected?

Yes. The features are locally cached in a SQLite layer and a newly
created feature will be stored locally and not retrieve from the
server.

> Is there anything we can fix?

Of course yes but it would require re-fetching the feature(s) after an
insert or an update, I think it will slow things down.

Besides that there is no perfect solution to server-side changes: if
some other user will trigger a data change on the DB we will of course
miss it anyway.


> Am I doing something wrong?

No.

Cheers


-- 
Alessandro Pasotti
QCooperative:  www.qcooperative.net
ItOpen:   www.itopen.it


More information about the QGIS-Developer mailing list