Skip to content

Commit c56a935

Browse files
committed
Allow --username and --user in osm2pgsql and osm2pgsql-replication
This was inconsistent and documented wrong. We prefer the --username variant, because that is consistent with psql, but both work now everwhere. See #2342
1 parent 71d9d36 commit c56a935

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

man/osm2pgsql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ mandatory for short options too.
7979
`postgres://`), it is treated as a conninfo string. See the PostgreSQL
8080
manual for details.
8181

82-
-U, \--username=NAME
82+
-U, \--username=NAME, \--user=NAME
8383
: Postgresql user name.
8484

8585
-W, \--password

scripts/osm2pgsql-replication

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ def get_parser():
627627
"see https://www.postgresql.org/docs/current/libpq-pgpass.html.")
628628
group.add_argument('-d', '--database', metavar='DB',
629629
help='Name of PostgreSQL database to connect to or conninfo string')
630-
group.add_argument('-U', '--username', metavar='NAME',
630+
group.add_argument('-U', '--username', '--user', metavar='NAME',
631631
help='PostgreSQL user name')
632632
group.add_argument('-H', '--host', metavar='HOST',
633633
help='Database server host name or socket location')

src/command-line-app.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void command_line_app_t::init_database_options()
4141
->type_name("DB")
4242
->group("Database options");
4343

44-
add_option_function<std::string>("-U,--user",
44+
add_option_function<std::string>("-U,--username,--user",
4545
[&](std::string const &value) {
4646
m_connection_params.set("user", value);
4747
})

0 commit comments

Comments
 (0)