我在 PostGIS 前面有 PostgREST,我想调用st_geomfromgeojson函数,如https://postgrest.org/en/stable/api.html#stored-procedures中所述。
curl -X 'POST' \
'http://postgrest-host:port/rpc/st_geomfromgeojson' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"type":"Point","coordinates":[-48.23456,20.12345]}'
得到错误:
{"hint":"Try renaming the parameters or the function itself in the database so function overloading can be resolved","message":"Could not choose the best candidate function between: public.st_geomfromgeojson( => json), public.st_geomfromgeojson( => jsonb)"}
有没有办法可以在 HTTP 请求中提供 PostGIS 函数参数以便public.st_geomfromgeojson( => json)
选择?