*Why can't I use a capitalized table name in my po...
# help
l
Why can't I use a capitalized table name in my posgres trigger function? Hi! I'm trying to set up my own public
Profile
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:
Copy code
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:
Copy code
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.
n
Hello @lumen! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
g
I answered you on github just now...
n
lumen (2022-06-01)
l
Yep, thank you so much!