Simple question. I have access to PostgreSQL. If I knew the name of the database I could

psql -d dbname

but if I don't know dbname, how can I list what databases are there?

link|improve this question

62% accept rate
feedback

1 Answer

up vote 3 down vote accepted

Assuming you have a valid login:

psql -l

BTW, this is in the man page.

link|improve this answer
thanks. doh, the problem with postgresql is that so many functions are in other instructions, that the obvious never occurred to me – interstar Feb 4 '10 at 10:47
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.