NSW government's decision to freeze public service wages overturned in upper house