Added support for postgres database