Today I noticed that one can use Emacs as a client for SQL databases in general and as a PostgreSQL client in special. This is great news, as the CLI for all databases I regularly use suck. With Emacs I have all the tools handy I need: searching in the output, copy & paste, etc. In short: all the Emacs greatness I'm used to. You can even send a region or a complete buffer to the database!
Trường wrote a good post about this topic. Definitely a must-read for Emacs users!