PostgREST cannot find any function, although it's listed in paths object #2495
-
Hey there! I've setup PostgREST 10.0.0 with swagger and it works very well for tables and views. But I don't get the functions working. I have PostGIS enabled, which provides a bunch of functions. Running for example {
"code": "PGRST202",
"details": null,
"hint": "If a new function was created in the database with this name and parameters, try reloading the schema cache.",
"message": "Could not find the public.postgis_version function with a single json or jsonb parameter in the schema cache"
} As told in the response, I've restarted the PostgREST docker compose service to recreate the schema cache. This doesn't change anything. "/rpc/postgis_version": {
"post": {
"tags": ["(rpc) postgis_version"],
"summary": "Returns PostGIS version number and compile-time options.",
"produces": ["application/json", "application/vnd.pgrst.object+json"],
"parameters": [
{
"in": "body",
"name": "args",
"required": true,
"schema": {
"description": "Returns PostGIS version number and compile-time options.",
"type": "object"
}
},
{ "$ref": "#/parameters/preferParams" }
],
"responses": { "200": { "description": "OK" } }
}
}, It tells me, that I have to add a body, but the SQL function does not require such. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello,
How are you making the request? (curl snippet) |
Beta Was this translation helpful? Give feedback.
Hello,
How are you making the request? (curl snippet)