mirror of https://github.com/dbcli/pgcli
Merge pull request #105 from fpietka/master
allows pgcli to connect to specified user's database
This commit is contained in:
commit
c9f651ba39
|
@ -99,8 +99,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