PostgreSQL: How to get all points in certain radius
问题 I'm using Postgresql 9.3 and iv'e installed cube and earthdistance extensions. I'm trying to follow this tutorial, so i have a simple events table with 4 fields: id, name, lat, lng. Now i'm trying to run this query, to get all events within 1 km radius: SELECT events.id, events.name FROM events WHERE earth_box(31.789225, 34.789612, 1000) @> ll_to_earth(events.lat, events.lng); but i keep getting this error: 20:59:34 Kernel error: ERROR: function earth_box(numeric, numeric, integer) does not