How do I install a specific version of a formula in homebrew? For example, postgresql-8.4.4 instead of the latest 9.0.
There's now a much easier way to install an older version of a formula that you'd previously installed. Simply use
brew switch [formula] [version]
For instance, I alternate regularly between Node.js 0.4.12 and 0.6.5:
brew switch node 0.4.12
brew switch node 0.6.5
Since brew switch
just changes the symlinks, it's very fast. See further documentation on the Homebrew Wiki under External Commands.