projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b0d6ee4
)
make psql honor explicit database parameter in -l mode, in case "postgres" database...
author
Andrew Dunstan
<
[email protected]
>
Thu, 17 Nov 2005 23:49:44 +0000
(23:49 +0000)
committer
Andrew Dunstan
<
[email protected]
>
Thu, 17 Nov 2005 23:49:44 +0000
(23:49 +0000)
src/bin/psql/startup.c
patch
|
blob
|
blame
|
history
diff --git
a/src/bin/psql/startup.c
b/src/bin/psql/startup.c
index 90b0c53cb4053c3e0d6478a53708c5ffc1340e0f..27834e3eff2dbdd87b2a67415a4acc1d031e934b 100644
(file)
--- a/
src/bin/psql/startup.c
+++ b/
src/bin/psql/startup.c
@@
-206,7
+206,8
@@
main(int argc, char *argv[])
{
need_pass = false;
pset.db = PQsetdbLogin(options.host, options.port, NULL, NULL,
- options.action == ACT_LIST_DB ? "postgres" : options.dbname,
+ options.action == ACT_LIST_DB && options.dbname == NULL ?
+ "postgres" : options.dbname,
username, password);
if (PQstatus(pset.db) == CONNECTION_BAD &&