postgresql update from inner join