Ahmad Swultra
05/08/2022, 10:12 AMbegin
insert into public.profiles (id,first_name,last_name)
values (new.id,new.raw_user_meta_data->> 'first_name',new.raw_user_meta_data->> 'last_name');
return new;
end;
i have this function work when a new row added in users table
It is creating a new row in the profiles table, and i want to make this function to check if the `raw_user_meta_data `have only `first_name `and last_name And they are not null and if the user pass other data in raw_user_meta_data, the signup action will fail