【发布时间】:2022-02-02 17:28:46
【问题描述】:
我在 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)?
【问题讨论】:
标签: postgresql postgis postgrest