```sql begin insert into public.UserFinanceData(...
# sql
a
Copy code
sql
begin
  insert into public.UserFinanceData(id)
  values(new.id);

  return new;
end;
This is the only thing stopping me from publishing my first big project and this of all things goes wrong
g
public."UserFinanceData" ... you really should not use caps in postgres, unless you were forced to by Prisma, or some other method. That gets converted to lower case and will not match if your table has upper case. Quotes have to be used for any reference.
I'm not positive if it is public."Table" or "public.Table" as I always use user_finance_data format for table and column names.
a
Wait what
So all I have to do is not capitalize UserFinanceData to and make it userfinancedata?
Would I change the actual table name as well or is changing just the query enough?
So this would be my new query
g
The table name is the issue. Quotes are acceptable around the name if you must keep camel case table
a
Copy code
sql
begin
  insert into public."userfinancedata(id)"
  values(new.id);

  return new;
end;
g
No if you put in quotes then you want the caps
a
I want to keep the table name the same
Copy code
sql
begin
  insert into public."UserFinanceData(id)"
  values(new.id);

  return new;
end;
Ok so this?
g
sigh.. no the (id) would be after the close quote.
a
Copy code
sql
begin
  insert into public."UserFinanceData"(id)
  values(new.id);

  return new;
end;
Hopefully this lol
g
I think that or "public.UserFinanceData" (id) but I don't know without looking as I don't use caps...
a
Let's say I were to change my table name from UserFinanceData to user_finance_data
Then would my initial query be acceptable?
g
well with user_finance_data as the table name yes. Unless you are forced to, save your self headaches and don't use caps for table or column names.
a
I did not know this, ty