script update for postgres