Postgresql Use Variable In Select Query