Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: PostgreSQL provider force read-only and in recovery #50186

Merged
merged 2 commits into from
Sep 15, 2022

Conversation

rldhont
Copy link
Contributor

@rldhont rldhont commented Sep 13, 2022

Description

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 the write capabilities when the provider is not forced to be in read-only or the database is not in recovery.

@rldhont rldhont added Data Provider Related to specific vector, raster or mesh data providers Bug Either a bug report, or a bug fix. Let's hope for the latter! PostGIS data provider labels Sep 13, 2022
@github-actions github-actions bot added this to the 3.28.0 milestone Sep 13, 2022
@nyalldawson
Copy link
Collaborator

Better add some unit tests as penance 😉

@rldhont rldhont force-pushed the postgres-forcereadonly-inrecovery branch 4 times, most recently from 07d1639 to 4f5088c Compare September 14, 2022 20:57
The PR *feat: Open layers in a read only mode with Qgis::ProjectReadFlag::ForceReadOnlyLayers* qgis#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
the write capabilities when the provider is not forced to be in read-only or the database is not in recovery.
@rldhont rldhont force-pushed the postgres-forcereadonly-inrecovery branch from 4f5088c to 08ecac9 Compare September 15, 2022 05:23
@rldhont
Copy link
Contributor Author

rldhont commented Sep 15, 2022

@nyalldawson tests for postgres provider added

@nyalldawson nyalldawson merged commit 82c6b16 into qgis:master Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Data Provider Related to specific vector, raster or mesh data providers PostGIS data provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants