History | View | Annotate | Download (211 KB)
Revert "Revert "Allowing storing GPGK raster layer styles to DB""
This reverts commit 9d8a72256893bd31a51d85927e9abd9cdb5eed29.
Add QgsRectangle::setNull(), deprecating setMinimal()
Revert "Allowing storing GPGK raster layer styles to DB"
Merge pull request #54558 from manisandro/rasterstyles
Allowing storing GPGK raster layer styles to DB
Make convertToProviderType static to bypass thread check
PG: fix issue GH #54572 st_geographyfromtext
Fix #54572 Error saving edit on PostGIS geometry when table also contains geography
Introduce Qgis::ProviderStyleStorageCapabilities
create postgres RO connection in the thread where the provider live
Postgres provider discover relations: add composite relation test + minor refacto
When invalid postgres credentials (username or password) are interactivelyupdated when loading a project, ensure that the updated credentialsare stored when the project is resaved
Otherwise the outdated credentials remain in the project and theuser is forced to re-enter the correct credentials on every...
move some PG connection options from QgsPostgresProvider to QgsPostgresConn
thread_local all const QRegularExpression objects
Replace QgsDebugMsg(...) with QgsDebugError(...) and ensure itis ONLY used for error message reporting
Everything else gets bumped to QgsDebugMsg(..., >= 2)
Load layers in parallel threads when opening project (#53069)
Mark common postgresql types as non-enumerable upon load
This fixes a big performance issue when loading projects with PostgreSQL layers.In the last stage of project loading, code in QgisApp would run codeto resolve broken layer dependencies, which in turn tried to find out best...
When creating new fields, only expose the 'Comment' option fordatasources which support editing comments
This support is currently limited to the postgres provider,so exposing the comment field for all other vector layer typesis just misleading to users. The comment will be completed discarded...
De-duplicate methods for determining relkind for postgres items
Deprecated unused, not-useful QgsVectorDataProvider::palAttributeIndexNames
Move postgres relkind enum to Qgis
Avoids having to include qgspostgresprovider header in a bunchof non-provider related files
Fix insufficiently escaped backslash in regular expressions
Genealizes the fix of https://github.com/qgis/QGIS/pull/52293 toother places exhibiting the same issue.
[postgres] Do not discard geometry attributes having no SRID
See https://github.com/qgis/QGIS/issues/49380#issuecomment-1282913470
Promote QgsWkbTypes enums to enum class, move to Qgis
Make SRID/CRS cache a per-connection object, rather than a process-static
Static cache is wrong (same SRID may have different meaning indifferent databases) and dangerous (can result in segfaults).
Closes GH-51893
Includes simple testcase for EWKT input/output in...
Move QgsMapLayerType enum to Qgis.LayerType (#51874)
For consistency with other enums
Fix PG identity default value with long field names
Fix #51563
Use ad-hoc WHERE clause for TopoGeometry layers
This is aimed at using spatial indexes on primitive tables.Only affects non-hierarchical TopoGeometry layers access.
Thanks Laurențiu Nicola (grayshade) for excellent feedback andSalvatore Fiandaca (pigreco) for testing !
[Clazy] remove unused-non-trivial-variable
Tests for style DB storage
Optionally load all stored styles from DB with correct names.
Fixes #37434
Funded by: Ministère des Forêts, de la Faune et des Parcs - Québec
Merge pull request #50230 from elpaso/bugfix-gh50168-pg-identity-default
Bugfix gh50168 pg identity default
Fix: PostgreSQL provider force read-only and in recovery
The PR feat: Open layers in a read only mode with Qgis::ProjectReadFlag::ForceReadOnlyLayers #49440 contains an error when checking write capabilities.
The write capabilities has to be checked when the database is not in recovery and when the provider is not forced to be in read-only. The old code checks...
Fix identity sequence
Merge pull request #49960 from rldhont/postgres-uri-param-session-role
feature(postgres): Define session role for connection
feat: Open layers in a read only mode with Qgis::ProjectReadFlag::ForceLayerReadOnly
In most cases of use of QGIS Server, it is not necessary to access the layers in write mode.The read-only mode is sufficient.
We would like to introduce a new flag Qgis::ProjectReadFlag::ForceLayerReadOnly to...
Be able to define a session role for postgres connection.
Documentation: https://www.postgresql.org/docs/current/sql-set-role.html
The `session_role` setting will be used to set the current user identifier...
Refactoring after PR review
Layer metadata provider API
Implementation of QEP #250 DB metadata storage.
- General API for registering layer metadata providers- Metadata provider GPKG- Metadata provider POSTGRES- Metadata provider POSTGRES RASTER
Tests and custom python metadata provider implementation....
Update core and gui to use QgsVariantUtils::isNull
Check for result
PG: Fix unreported credentials exposure on connection lost
also fixes a few crashes when connection is lost due to missingcheck of PG result.
Add icon to QgsProviderMetada
Add QgsProviderMetadata::supportedLayerTypes() so that we canquery the layer types supported by a data provider
PG: Log prepared statements and exec prepared
I'm still in doubt if/how to log params too, they can be huge or binary.
Not logged for now.
Use explain plan to estimate featureCount with filter (fixes #48446)
More query logging
More on query logging
wip
Use read-only connection when writing is not needed
Re-use possibly cached postgis_version from pgsql description method
Address review
[api] Don't use widgets in QgsProviderMetadata::saveStyle implementations
This is not safe to do -- it causes a crash if the api is used ina background thread
Fixes #46954Fixes #46914
[postgres] Add styleExists test, minor fix for listStylesInDatabase returning error when layer_styles table not present
[api] Add QgsProviderMetadata method to test whether a style witha specified ID already exists
Preserve feature map on layer clone
Make sure postgres provider internals are preserved across a layerclone.This helps to keep feature ids stable for things like extract labels
[postgres] Don't try to retrieve values from srs query if no results are returned
Fix API issues causing malformed python stub files
Fixes #46240
simplify code
Fix NULL ewkt
Remove useless check
Adjust naming
Reverse select CRS
[postgis] expose additional geometry columns as QgsReferencedGeometry
Good bye ewkt
Introduce VectorLayerType flags
Add isQuery() to vector layer and data provider
The method returns TRUE if the layer is a query/sql layer.
This allows to selectively show the "Update SQL Layer..." menuentry in the legend.
Partial fix for #45796
Fix PG error when failing to update geom & constrained field (#45266)
The problem was that throwing an exception the prepared statementwas not deallocated.
Fix #45100