mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
Fixes #38092 by adding an optional QgsFeedback argument to the executeSql method and by implementing the PQCancel method in the PG provider internals. While the cancellation works well for all supported provider while fetching results in the loop, the cancellation of a running query is now implemented for the postgres provider connection only because the GPKG and GDAL both rely on GDALDatasetExecuteSQL which cannot be interrupted. This PR also introduce a few optimizations in the PG DB-Manager code that should probably fix also other "slowness" issues that were reported after 3.x during PG query execution. A small UX change in th SQL dialog makes it evident to the user that a cancellation request has been sent to the backend: the button text is changed to "Cancellation requested, please wait..." so that for provider connections that are not able to interrupt the running query and must wait for the fetching loop to exit from the exeuteSql call the user knows that something is happening and that a cancellation request has been successfully sent.