Supabase postgres function is not found on supabase js
Hi.
I have this function that when i use the rpc function of supabase returns me the following.
Error message:
"Could not find the public.close_advertisements() function or the public.close_advertisements function with a single unnamed json or jsonb parameter in the schema cache"
I added the security definer to try an make it visible but without success
I have this function that when i use the rpc function of supabase returns me the following.
CREATE OR REPLACE FUNCTION close_advertisements (lat float, lng float)
RETURNS SETOF public.advertisements
LANGUAGE plpgsql
AS $$
BEGIN
RETURN query (
SELECT
*
FROM
advertisements
WHERE
ST_DWithin (geom, ST_SetSRID (ST_MakePoint (lng, lat), 4326), 10000));
END;
$$
SECURITY DEFINER SET search_path = extensions, public, pg_temp;Error message:
"Could not find the public.close_advertisements() function or the public.close_advertisements function with a single unnamed json or jsonb parameter in the schema cache"
I added the security definer to try an make it visible but without success