this is my custom SQL ```create or replace functi...
# help
k
this is my custom SQL
Copy code
create or replace function public.handle_new_user() 
returns trigger as $$
begin
  insert into public.users (id, avatar, first_name, last_name)
  values (new.id, new.raw_user_meta_data->>'avatar_url', new.first_name, new.last_name);
  return new;
end;
$$ language plpgsql security definer;

create trigger on_auth_user_created
  after insert on auth.users
  for each row execute procedure public.handle_new_user();