RLS?
# help
g
RLS?
d
RLS is not enabled on the profile table
anywhere I can log this
new
value ?
t
you need to use the returning clause on your query
This may work depending on situation
Copy code
sql
begin
  update profile
  set points = points + 2
  where id::text = new.kid_id
  returning * into new;
  return new;
end;
g
Is this a trigger function? We last talked in another thread and you were going to use RPC function, which won't have new...
d
@User yes, this time, the new object should have the data I needed. I'm just playing with this function trigger way to learn more about supabase(pgsql)
The RPC way works. I just wondering if I can save a api call from my code to supabase. Normally I can make all calls in my code instead of using functions and rpcs, but for learning purpose and save extra around of the api call 😛