Add support for postgresql

Add support for postgresql (the schema is different for postgresql!)