update for pgsql