updating database for postgres