Hi every one,
I'm developping a QGIS 2.18 plugin that works with a multiuser
postgreSQL database.
I need to create a connection with postgreSQL/Postgis and pass some
custom parameters to the session (SET SESSION variable) to handle some
row-level access (postgres 9.5 - Create policy). For that I try to use
QgsDataSourceURI from 2.18 pyqgis API. But I can't figure out how to
pass custom parameters at the session level with this tool. I need that
to add layers to QGIS that would be automatically filtered by this
custom parameters which works with my postgreSQL policy.
See for a more detailled explanation of the problem, I have this related
question on GIS Stack Exchange:
https://gis.stackexchange.com/questions/276292/loading-postgres-layer-with-session-parameter-set-using-pyqgis
Thank's in advance for answers!
--
sign-pro
*Yoann Lecomte*
/Développeur Géomaticien/
Tél: 06.07.65.70.47
<https://www.linkedin.com/in/yoannlecomte/>
<https://www.github.com/yolecomte/>
Pensez environnement, n'imprimez ce mail que si nécessaire
_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer