can osm2pgsql support PGSERVICEFILE ? #2437
Unanswered
hadjiprocopis
asked this question in
Q&A
Replies: 2 comments 1 reply
-
|
Yes, you can use all the PG* variables including PGSERVICEFILE and osm2pgsql will pick them up. It uses libpq under the hood. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Hmm, sorry because I must be doing something wrong then with this (with or without it says: Whereas this works for Perhaps there is a way to insert that |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
psqlhas 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=postgres' ...and the service file contains something like:
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 is supported by
osm2pgsql. I mean I searched but could not find anything. I know one can specify--password apasswordor-Wto get a password prompt.thanks a lot for this open source and free software.
Beta Was this translation helpful? Give feedback.
All reactions