- SELECT rank_address FROM placex
- WHERE rank_address < 24
- and rank_address >= NEW.rank_address
+ SELECT rank_address
+ FROM placex,
+ LATERAL compute_place_rank(country_code, 'A', class, type,
+ admin_level, False, null) prank
+ WHERE prank.address_rank < 24
+ and prank.address_rank >= NEW.rank_address