[Tile-serving] [openstreetmap/osm2pgsql] Rename `--password` flag to `--use-password-prompt` or similar (Issue #1685)

William Edmisten notifications at github.com
Mon Jun 20 16:41:31 UTC 2022


## What version of osm2pgsql are you using?

```
2022-06-20 12:28:48  osm2pgsql version 1.6.0 (1.6.0-152-g5f47ebdc)
Build: RelWithDebInfo
Compiled using the following library versions:
Libosmium 2.17.3
Proj [API 4] Rel. 6.3.1, February 10th, 2020
Lua 5.3.3
```

## What operating system and PostgreSQL/PostGIS version are you using?

Ubuntu 20.04.4 LTS
PostgreSQL: 13
PostGIS: 3.1


## Tell us something about your system

N/A


## What did you do exactly?

I was using osm2pgsql with a usage like:

`osm2pgsql --create -U postgres -H localhost -P 5432 -W password input_file.osm.pbf`, 

*This was user error on my part.* Per the help info, the --password flag forces a password prompt. However, this was surprising to me, because all the other DB flags accept a value.

```
Database options:
    -d|--database=DB  The name of the PostgreSQL database to connect to or
                    a PostgreSQL conninfo string.
    -U|--username=NAME  PostgreSQL user name.
    -W|--password   Force password prompt.
    -H|--host=HOST  Database server host name or socket location.
    -P|--port=PORT  Database server port.
```


## What did you expect to happen?
That the `--password` flag was used to provide the password, rather than forcing a manual password entry. However, I think renaming this flag would make the usage a bit clearer. Maybe something like `--use-password-prompt` or `--prompt-password`

## What did happen instead?

The command interpreted `password` as the input file, and failed because such a file does not exist.

## What did you do to try analyzing the problem?

N/A

Thanks for your time!

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/1685
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/osm2pgsql/issues/1685 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20220620/5ca13501/attachment.htm>


More information about the Tile-serving mailing list