postgresql update join 2 tables