[Tile-serving] [osm2pgsql-dev/osm2pgsql] can osm2pgsql support PGSERVICEFILE ? (Discussion #2437)
Andreas Hadjiprocopis
notifications at github.com
Fri Dec 5 13:30:01 UTC 2025
`psql` has this feature whereas you can specify a "service file" which contains username/dbname/password combinations (and other things like host, port, etc.) for connecting to a Pg db.
The location of the service file can be specified as an environment variable and can be made to be used just for the current session by doing something like this:
```PGSERVICEFILE='myservicefile.pg' psql 'service=mydbname' ... ```
and the service file contains something like:
```
[postgres]
host=
port=
dbname=mydbname
user=mydbuser
password=xyz
```
The benefit of this is that you do not specify a password on the command line and that the service file can be made to be temporary and specific to just one command, so no system-wide files with passwords, which I prefer personally.
I was wondering if that feature i supported by `osm2pgsql`. I mean I searched but could not find anything. I know one can specify `--password apassword` or `-W` to get a password prompt.
thanks a lot for this open source and free software.
--
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/discussions/2437
You are receiving this because you are subscribed to this thread.
Message ID: <osm2pgsql-dev/osm2pgsql/repo-discussions/2437 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20251205/b8932ec1/attachment.htm>
More information about the Tile-serving
mailing list