Installation¶
Install the plugin¶
The plugin is available from the official QGIS plugin repository. In QGIS, go to Plugins > Manage and Install Plugins... and search for PG service parser.
pg_service.conf location¶
If your pg_service.conf file is located at one of the default locations, the plugin will find it automatically:
- Linux:
/home/YOUR_USER/.pg_service.conf - macOS:
/Users/YOUR_USER/.pg_service.conf - Windows:
%APPDATA%\postgresql\.pg_service.conf
If your file is elsewhere, set the PGSERVICEFILE environment variable pointing to your file path, either on your system or in QGIS under Settings > Options > System > Environment, and restart QGIS.
If PGSERVICEFILE is not set, the pg_service.conf file in the directory given by the PGSYSCONFDIR environment variable is used.
The path currently in use is shown at the top of the plugin dialog. Hover the info icon next to it to see how it was determined.
Clients like QGIS will directly read your pg_service.conf file from any of these locations and you'll be able to use any service from this file in the New Connection dialog (see QGIS docs).
Create a pg_service.conf file¶
If you don't have a pg_service.conf file, the plugin allows you to create one at a default location.