Re: QGIS-Developer Digest, Vol 165, Issue 24

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: QGIS-Developer Digest, Vol 165, Issue 24

Giovanni Manghi
Hi all,


> Here is a quite interesting new feature in PostgreSQL 12:
>
> https://www.2ndquadrant.com/en/blog/generated-columns-in-postgresql-12/
>
> It is similar to virtual columns in QGIS.
>
> I suspect that users will want to use that new column type. What does
> this mean for QGIS? I guess QGIS will have to detect this new column
> type in the future and mark it as "immutable". So other columns are
> read/write, but generated columns will be read only. Does QGIS already
> support a concept like this where some columns are read/write and others
> not

speaking about unsupported postgresql features it would also be very
useful supporting correctly column permissions, the last time I
checked (not recentli I admit) it didn't worked at all in QGIS.

cheers!

-- G --
_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: QGIS-Developer Digest, Vol 165, Issue 24

Stefan Steiger
There's a docker file, if anybody  wants to try PostgreSQL 12:
https://github.com/docker-library/postgres/blob/87b15b6c65ba985ac958e7b35ba787422113066e/12/Dockerfile 
 
@giovanni:
It works if you're SuperUser :p



-----Urspr√ľngliche Nachricht-----
Von: QGIS-Developer [mailto:[hidden email]] Im Auftrag von Giovanni Manghi
Gesendet: Donnerstag, 11. Juli 2019 13:19
An: [hidden email]
Betreff: Re: [QGIS-Developer] QGIS-Developer Digest, Vol 165, Issue 24

Hi all,


> Here is a quite interesting new feature in PostgreSQL 12:
>
> https://www.2ndquadrant.com/en/blog/generated-columns-in-postgresql-12
> /
>
> It is similar to virtual columns in QGIS.
>
> I suspect that users will want to use that new column type. What does
> this mean for QGIS? I guess QGIS will have to detect this new column
> type in the future and mark it as "immutable". So other columns are
> read/write, but generated columns will be read only. Does QGIS already
> support a concept like this where some columns are read/write and
> others not

speaking about unsupported postgresql features it would also be very useful supporting correctly column permissions, the last time I checked (not recentli I admit) it didn't worked at all in QGIS.

cheers!

-- G --
_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: QGIS-Developer Digest, Vol 165, Issue 24

Giovanni Manghi
> @giovanni:
> It works if you're SuperUser :p

oh really?! column level permissions works only if the user is
superuser? is that a feature or bug? of qgis or postgresql? :)

cheers!

-- G --
_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: QGIS-Developer Digest, Vol 165, Issue 24

Stefan Steiger
A cynical joke :)

I think you are talking about something like this ?
https://gis.stackexchange.com/questions/277677/qgis-problem-with-postgresql-postgis-column-permissions 

Correct working depends on the SQL-statements issued by QGIS.
If it updates values in columns where no value changed, it requires GRANT-UPDATE rights to this columns.

This is more of a SQL-generation problem than a permission issue.
It shouldn't issue updates on values that didn't change, but it does.

And if you update values where you don't have update rights, that generates an SQL error.

Besides, how are column-level permissions supposed to work ?
What happens if you load a value from a column where you don't have permission, and then save/update back the fields of a record where you have permissions.
The result is potential data garbage.  
The entire idea of partial data loading AND THEN BEING ABLE TO SAVE the loaded data (or parts thereof) back is a somewhat fishy concept.
Either you can alter an entire record, or you cannot.

At this point it would be worth pointing out that seeing a subset of available records (e.g. via portfolio rights) presents similar issues.
Are different users going to see different results when they sum areas, for example ?
Are they going to do some financial calculation with the result ?
Who sets the permissions, and how do you guarantee permissions are set properly ?
Are any unfortunate combination of permissions gonna crash the system ? Gonna cause malfunctions ?
Query performance - is it going to grind the system to a halt ?

If anybody is going to implement any kind of permissions, you need to think about ALL the consequences first, and also whether or not that makes sense in the first place, especially considering the computational complexity this adds to your program.  And then you need to decide if that added value is worth the costs it incurs, especially including opportunity costs.



-----Urspr√ľngliche Nachricht-----
Von: Giovanni Manghi [mailto:[hidden email]]
Gesendet: Donnerstag, 11. Juli 2019 17:20
An: Stefan Steiger <[hidden email]>
Cc: [hidden email]
Betreff: Re: [QGIS-Developer] QGIS-Developer Digest, Vol 165, Issue 24

> @giovanni:
> It works if you're SuperUser :p

oh really?! column level permissions works only if the user is superuser? is that a feature or bug? of qgis or postgresql? :)

cheers!

-- G --
_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer