postgresql update select from same table