Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[postgres] Fix checkPrimaryKeyUnicity option
This provider option was linked to the project level option "Trust layer metadata..." which was implemented to speed up loading of large dataset by trusting extent read from metadata to avoid costly operations to determine the layer extent. Check PK unicity on the other hand has only effect on views and query layers and it is useful as an independent option to prevent loading of layers that have no PK (or the wrong one). But the operation of determine unicity of a values in a column can also be costly, so better to get control back to the user. Legacy default is preserved (the project-level "Trust..." option). Fixes #21839 Funded by RAAB.nl
- Loading branch information
Showing with 88 additions and 46 deletions.
- +2 −0 src/app/qgsprojectproperties.cpp
- +1 −25 src/core/qgsvectorlayer.cpp
- +19 −5 src/providers/postgres/qgspgtablemodel.cpp
- +0 −2 src/providers/postgres/qgspostgresconn.h
- +1 −2 src/providers/postgres/qgspostgresprovider.cpp
- +12 −12 src/ui/qgsprojectpropertiesbase.ui
- +15 −0 tests/src/python/test_provider_postgres.py
- +38 −0 tests/testdata/provider/testdata_pg.sql