<div dir="ltr">Hi Nyall, <div>That's great! </div><div><br></div><div>from a user point of view, the first two main use cases that would benefit of implementing that would be the DB Manager drag and drop loader and the processing postgis loader algorithm. </div><div>Cheers</div><div>Régis</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-06-15 6:00 GMT+02:00 Nyall Dawson <span dir="ltr"><<a href="mailto:nyall.dawson@gmail.com" target="_blank">nyall.dawson@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 11 June 2017 at 08:04, Nyall Dawson <<a href="mailto:nyall.dawson@gmail.com">nyall.dawson@gmail.com</a>> wrote:<br>
> On 11 June 2017 at 05:49, Matthias Kuhn <<a href="mailto:matthias@opengis.ch">matthias@opengis.ch</a>> wrote:<br>
><br>
>><br>
>> Something else to discuss is what will be sent along with the<br>
>> `featureAdded(QgsFeatureId fid)` signal if the id is generated on the DB but<br>
>> not propagated back to the client.<br>
>><br>
><br>
> I don't think this is a big limitation - we just note it in the docs<br>
> for the fast insert flag that featureAdded won't be emitted. It's only<br>
> emitted when adding to a vector layer anyway, and most of the cases<br>
> where the fast insert flag will be used will be adding directly to a<br>
> data provider.<br>
<br>
</span>Right, I've implemented the flag over in <a href="https://github.com/qgis/QGIS/pull/4734" rel="noreferrer" target="_blank">https://github.com/qgis/QGIS/<wbr>pull/4734</a><br>
<br>
This opens the possibility of using a COPY statement in the postgres<br>
provider when FastInsert flag is set. I haven't done that, so<br>
presuming the PR is acceptable it'd be a good time for someone else to<br>
jump in and make this improvement. All required changes would be self<br>
contained in QgsPostgresProvider::<wbr>addFeatures.<br>
<br>
This would be great to have for 3.0 - we've already made huge<br>
improvements in the speed of various related operations, and<br>
implementing COPY for FastInsert would then also have massive flow on<br>
benefits to processing algs which are saving their results direct to a<br>
postgres database.<br>
<span class="HOEnZb"><font color="#888888"><br>
Nyall<br>
</font></span></blockquote></div><br></div>