ThirdBase
02/04/2022, 3:46 AMbegin
UPDATE public.articles
SET created_by = public.getusername();
RETURN created_by;
end;
return type trigger
The getusername() function is:
select username
from public.profiles
where id = auth.uid();
And returns text. I know this function works as it's the default value on the articles table on row insert, but not sure why it keeps erroring on updategaryaustin
02/04/2022, 4:01 AMgaryaustin
02/04/2022, 4:01 AMThirdBase
02/04/2022, 4:05 AMbegin
UPDATE public.articles
SET created_by = public.getusername();
RETURN new;
end;
ThirdBase
02/04/2022, 4:05 AMThirdBase
02/04/2022, 4:05 AM