用户将提供用户名和半径。
select username
, ST_Distance(u.location, me.location) as distance
from users as u
, lateral(select id
, location
from users
where username=username) as me
where u.id <> me.id
and ST_Distance(u.location, me.location) < radius
order by distance;