This question deals with getting a list. So I get this:
$ psql --list
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
----------------+----------+----------+-------------+-------------+-----------------------
testdb1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
odoo | openerp | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
odoo-demo | openerp | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
odoo8 | openerp | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
I could use psql --list|grep UTF8|awk '{ print $1 }'
to get a list of just the databases. Can psql
also give me a clean useful list directly?
-Atc
switches should be mentioned in the answers of the much more popular question you linked.