Update detection of pg version