Added (yet untested) support for Postgres.