mirror of https://github.com/dbcli/pgcli
allows pgcli to connect to specified user's database
This commit is contained in:
parent
78819664cd
commit
8d502bf0cc
|
@ -98,8 +98,11 @@ class PGCli(object):
|
|||
# Connect to the database.
|
||||
|
||||
if not database:
|
||||
# default to current OS username just like psql
|
||||
database = user = getuser()
|
||||
if user:
|
||||
database = user
|
||||
else:
|
||||
# default to current OS username just like psql
|
||||
database = user = getuser()
|
||||
|
||||
# Prompt for a password immediately if requested via the -W flag. This
|
||||
# avoids wasting time trying to connect to the database and catching a
|
||||
|
|
Loading…
Reference in New Issue