© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•8mo ago•
3 replies
Thornyweb

Modifying raw_user_meta_data at registration

I've got a trigger function that fires after a user registers, I'm passing additional profile data through from my registration form into the raw_user_meta_data and the function pulls that out and inserts it into DB tables.

What I then want to do in my function is remove the keys from the meta_data that are now stored in the other tables. Is that possible?

I've got the following code which the AI assistant prompted me with but it doesn't appear to be working:

update auth.users
set
  raw_user_meta_data = raw_user_meta_data - 'key_to_remove_1' - 'key_to_remove_2'
where
  id = new.id;
update auth.users
set
  raw_user_meta_data = raw_user_meta_data - 'key_to_remove_1' - 'key_to_remove_2'
where
  id = new.id;
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

RAW_USER_META_DATA
SupabaseSSupabase / help-and-questions
4y ago
new.raw_user_meta_data
SupabaseSSupabase / help-and-questions
4y ago
Delete field from raw_user_meta_data
SupabaseSSupabase / help-and-questions
4y ago
declare unique property in `raw_user_meta_data`
SupabaseSSupabase / help-and-questions
3y ago