Trigger on auth.users causes permission denied for schema public
When a user signs up, i have a trigger that runs to create an entry in another table called public.profiles.
it runs this function:
Now when I test this, i get the following error in the logs:
When I remove the trigger then the auth.user is created but of course the public.profiles/settings is not.
Anyone see anything wrong here?


2 Replies
The most common error is the function needs to security definer type. Check the Postgres logs for the real error.
The next most common thing is not getting column types correct.
The next most common thing is not getting column types correct.
So in the end i just deleted the trigger and function, and recreated it all from scratch it now it works 🤷♂️