I have a database, and I need to know the default encoding for the database. I want to get it from the command line.
Because there's more than one way to skin a cat:
psql -l
Shows all the database names, encoding, and more.