[Qgis-user] PostGIS connection with service file

Fuenfer-Koenigstein.Benjamin at swm.de Fuenfer-Koenigstein.Benjamin at swm.de
Tue Jul 19 00:35:16 PDT 2016


Hi all,

something good to know when creating a PostGIS connection in QGIS using a service defined in .pg_service.conf:
While pgAdmin reads the conf-file not taking care the EOL-setting (end of line), QGIS can only read conf-files saved with UNIX-EOL-setting (LF only; e.g. in Notepad++: Edit -> EOL Conversion -> Convert to UNIX). With Windows-Setting (CR+LF), QGIS interpreters the CR as blank space after the actual host-name and the host-name can't be read correctly (Error message: could not translate host name "localhost " to address: Unknown server error).
Seems that pgAdmin is "more intelligent", or in other words, is less strict interpreting the conf-file than QGIS is. Took me a while to find this out and may help others when trying to create a PostGIS-service-connection in QGIS.

Best regards

Benjamin Fünfer-Königstein
S-IP-AN-TG Techn. Geschäftsfelder

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20160719/a34437c0/attachment.html>


More information about the Qgis-user mailing list