Change update function for pgsql.