lumen
06/01/2022, 2:20 AMProfile
table that holds custom data for my users. Every time a user signs up with Supabase Auth and is INSERTed into auth.users
table, I want to run a trigger function that adds the user to my Profile
table.
Everything works well when my table is called profile
and the function looks like this:
begin
insert into public.profile(id, email)
values(new.id, new.email);
return new;
end;
But now I want to capitalize the profile table name. I rename the profile
table into Profile
, and change the function to this:
begin
insert into public.Profile(id, email)
values(new.id, new.email);
return new;
end;
And it stops working, I'm getting an error:
> relation "public.profile" does not exist
Do you know what am I doing wrong? It's like postgres doesn't see that I have capitalized the table name when I'm referring to it in my postgres function.Needle
06/01/2022, 2:20 AMgaryaustin
06/01/2022, 2:31 AMNeedle
06/01/2022, 2:31 AMlumen
06/01/2022, 2:34 AM