How can I assign the auth.uid() to a row for examp...
# sql
n
How can I assign the auth.uid() to a row for example to created_by?
Copy code
BEGIN
  NEW.created_by = auth.uid();
  RETURN NEW;
END;
-> Error: more than one row returned by a subquery used as an expression
j
where are you typing this?
n
in a function
j
i just created a new function with your code and it worked
does it work when you create a new function?
n
weird a new function worked, but then editing the function throws the error again
but thank you very much 🙂