DB GUI is a Database querying desktop app built in Ruby. It supports PostgreSQL to start. Version 0.4.0 added support for remembering SQL command history. I needed that feature at my job, so I added it very quickly, thanks to the awesomeness of Ruby!