0

I have a custom function in my remote PostgreSQL/PostGIS database that finds the nearest linestring based on the given coordinates (lon, lat in CRS: 4326). I am on Windows 10 (x64 machine) and using PostgREST API to make my curl request talk to the remote pg database.

The curl command is:

curl "http://my_host:my_port/my_table?select=get_nearest_linestring(9.18233279,45.47184631)"

I get the error:

{"hint":null,"details":null,"code":"42703","message":"column my_table.get_nearest_linestring does not exist"}

I could see a relevant question here but I don't get any hints. Can someone help me to understand what I am doing wrong?

khajlk
  • 791
  • 1
  • 12
  • 32
  • Not a postgrest expert, but I think this is what you're looking for: https://postgrest.org/en/v7.0.0/api.html?highlight=stored%20procedure#s-procs – Mureinik Sep 10 '20 at 08:35
  • What are the parameters of `get_nearest_linestring`, can you share the function signature? – Steve Chavez Sep 10 '20 at 17:15

0 Answers0