RPC function doesn't work

BEGIN
UPDATE public.kisis_cache
SET cached=array_append(cached, id_to_cache)
WHERE user_id=cacher_id;
END
BEGIN
UPDATE public.kisis_cache
SET cached=array_append(cached, id_to_cache)
WHERE user_id=cacher_id;
END
I want my function to append a new value to existing array stored in cached column (type: textarray). So I wanted to append it based on user_id. Tried to check logs but didn't find any errors. Guys, could you help me please?
No description
1 Reply
Hermes
Hermes3y ago
Idk much about SQL as i started using it recently because of supabase. does the function work in the sql editor? I usually test them there before running in my js code

Did you find this page helpful?