Add Postgresql compatibility

Tested on _postgresql_ 9.2 and working with great success (although I have not fully tested the _cart_ or _order_ parts…)
Compatibility with _MySQL_ should also continue to work, but I've been unable to test this.