1
0
Fork 0

Merge pull request #105 from fpietka/master

allows pgcli to connect to specified user's database
This commit is contained in:
Amjith Ramanujam 2015-01-10 17:05:50 -08:00
commit c9f651ba39
1 changed files with 5 additions and 2 deletions

View File

@ -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