There are two fields in the database table, latitude and longitude. (Other fields too, but they are not important now.)
I have a function, where are three parameters: latitude, longitude and max_distance (km).
Is there any way to construct raw PostgreSQL query that returns only the rows that represent location which is within that max_distance (km) measured from given latitude and longitude?
Example parameters latitude=59.9138699, longitude=10.7522451, max_distance=10