Re: BUG #15025: PSQL CLI - inconsistency when both -d and -U supplies a username
От
Tom Lane
Тема
Re: BUG #15025: PSQL CLI - inconsistency when both -d and -U supplies a username
Дата
Msg-id
29202.1517168326@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
BUG #15025: PSQL CLI - inconsistency when both -d and -U supplies ausername PG Bug reporting form <noreply@postgresql.org>
Re: BUG #15025: PSQL CLI - inconsistency when both -d and -Usupplies a username Bruce Momjian <bruce@momjian.us>
Re: BUG #15025: PSQL CLI - inconsistency when both -d and -U supplies a username Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #15025: PSQL CLI - inconsistency when both -d and -Usupplies a username Bruce Momjian <bruce@momjian.us>
Re: BUG #15025: PSQL CLI - inconsistency when both -d and -U supplies a username Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #15025: PSQL CLI - inconsistency when both -d and -Usupplies a username Bruce Momjian <bruce@momjian.us>
Re: BUG #15025: PSQL CLI - inconsistency when both -d and -U supplies a username Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #15025: PSQL CLI - inconsistency when both -d and -U supplies a username Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian writes: > psql -d "postgresql://user2@momjian.us/test" -U user1 > --> Password for user user1: > but it wants the user2 password. > It doesn't matter whether -U is first or last, it always prompts for the > -U user, but connects as the -d user. Bleah. > Because the URI is parsed by libpq, I don't think we can do any better > than just suppress the user name in the password prompt when a URI is > used. That doesn't seem very user-friendly at all. I think that the most correct behavior in this case would be to throw an error because of the conflicting command line parameters. Now admittedly, psql doesn't throw an error for psql -U alice -U bob so maybe just silently making a choice is OK, but we need to be clear as to which choice we made. Isn't it possible to get the URI parse results back out of libpq? regards, tom lane
В списке pgsql-bugs по дате отправления
От: Bruce Momjian
Дата: