Postgres is indeed a very good choice, I know I can always count on it.
If I had to choose one, I would go with Emacs. It is not perfect of course; if only it was written in Common Lisp. But it gives me a huge amount of control on everything I use it with: programming, notes (Org), mails (Gnus), and so many other things.
No other software is that customizable.