May 2018
Intermediate to advanced
576 pages
30h 25m
English
This feature applies to libpq connections only, so it does not apply to JDBC.
The connection service file can also be used to specify the user, though that would mean that the username would be shared.
The pg_service.conf and .pgpass files can work together, or you can use just one of the two as you choose. Note that the pg_service.conf file is shared, so it is not a suitable place for passwords. The per-user connection service file is not shared, but in any case, it seems best to keep things separate and confine passwords to .pgpass.