<div dir="ltr">I think you have to name the file "pg_service.conf" not ".pg_service.conf" when settingĀ 

PGSYSCONFDIR. It works well here.<div><br></div><div>By the way, these type of questions are better asked in qgis-user.</div><div><br></div><div>Cheers,</div><div><br></div><div>Olivier</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 27 Feb 2020 at 10:40, Jakob <<a href="mailto:jakob@lanstorp.com" target="_blank">jakob@lanstorp.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I have a .pg_service.conf file with a Postgres connection use as a Service<br>
connection in QGIS dialog "Create a New PostGIS Connection", running on<br>
Windows 10.<br>
<br>
This works fine when the pg_service is placed in the folder<br>
"C:\Users\myuser\AppData\Roaming\Postgresql".<br>
<br>
Now to change the folder of the pg_service file I somewhere read that the<br>
folder is defined in environmental variable PGSYSCONFDIR, but setting a path<br>
in this variable does not make QGIS look in the new folder for the<br>
.pg_service.conf file. It still looks in the folder <br>
"C:\Users\myuser\AppData\Roaming\Postgresql".<br>
<br>
Do I misunderstand the meaning of PGSYSCONFDIR variable use in QGIS?<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html" rel="noreferrer" target="_blank">http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html</a><br>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></blockquote></div>