<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi every one,</p>
<p>I'm developping a QGIS 2.18 plugin that works with a multiuser
postgreSQL database. <br>
</p>
<p>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. <br>
</p>
<p>See for a more detailled explanation of the problem, I have this
related question on GIS Stack Exchange:<br>
</p>
<p><a
href="https://gis.stackexchange.com/questions/276292/loading-postgres-layer-with-session-parameter-set-using-pyqgis">https://gis.stackexchange.com/questions/276292/loading-postgres-layer-with-session-parameter-set-using-pyqgis</a></p>
Thank's in advance for answers!
<div class="moz-signature">-- <br>
<title>sign-pro</title>
<meta charset="utf-8">
<style>
body {
font-family:Arial;
}
</style>
<p> <strong>Yoann Lecomte</strong><br>
<i>Développeur Géomaticien</i><br>
Tél: 06.07.65.70.47<br>
<a href="https://www.linkedin.com/in/yoannlecomte/"> <img
src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c9/Linkedin.svg/2000px-Linkedin.svg.png"
width="40" height="40"></a> <a
href="https://www.github.com/yolecomte/"> <img
src="https://image.flaticon.com/icons/svg/25/25231.svg"
width="40" height="40"></a> <br>
<br>
<span style="font-size:10px;color:green;">Pensez environnement,
n'imprimez ce mail que si nécessaire</span> </p>
</div>
</body>
</html>