Postgresql groupreply problem