-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add PostGIS view -- primary key is ignored #22769
Comments
Author Name: Jürgen Fischer (@jef-n) The arbitray pre-selection of the first column is gone. You are now required to select the primary keys (one or more columns). |
Author Name: Thomas Kandler (Thomas Kandler) Jürgen Fischer wrote:
Any rationale for this? I am just wondering since even a arbitrary selection would be as efficient as the mandatory selection at worst; and in many cases more efficient since I save 2 clicks per layer/view. P.S. Issue can be closed; I will do asap. |
Author Name: Thomas Kandler (Thomas Kandler)
|
Author Name: Jürgen Fischer (@jef-n) Thomas Kandler wrote:
QGIS doesn't know what the unique column is and was always supposed to be selected. The preselection was hiding this and led to reports of strange effects when it wasn't unique. |
Author Name: Thomas Kandler (Thomas Kandler) Jürgen Fischer wrote:
Thank you very much for the clarification. I'd taken another approach but I am also not a contributing dev. Anyhow, I guess #22350 could be a well worth investment for folks who have a lot of PostGIS views (spanning multiple DBs) in their everyday work. |
Author Name: Thomas Kandler (Thomas Kandler)
Original Redmine Issue: 14813
Affected QGIS version: 2.14.0
Redmine category:data_provider
When loading a PostGIS view with a primary key, the key should be choosen automatically (by using the first column I guess). In QGIS 2.8 this was possible, since 2.12 the function does not exist anymore. Maybe it is a deliberate change to avoid errors when loading a layer which turns out to have non-unique values in this column. Maybe it is a bug. In the first case, I'd second #22350
This affects views with an unique integer column (+ all other columns are string-type) as well as views with a singular string column (+ geom column).
The text was updated successfully, but these errors were encountered: