postgresql update value from select