Calculating distance between a gps location and postgis geography value using a function?
问题 I have lat and long values for a user. I have addresses of various locations saved in db. I want to find the nearest offers based on a radius value. I am using postgis. Currently my location column is of type geography. What is the format in which I should enter the data into "location" column geography type when I have only latitude and longitude? I cannot use postgis functions since I am using graphql to do data insert. I have been tearing my hair apart trying to write a function for this