You can do an rpc call to a security definer function and do it.
garyaustin
02/27/2022, 8:17 PM
You can also write to another table when it changes with a trigger, if the overhead makes sense
u
2old4this
02/27/2022, 8:21 PM
ok, just so i understand, i can create a security definer function to get the data i need from the auth.users table and either call it via rpc, or trigger it to update on a table in my public scema?
g
garyaustin
02/27/2022, 8:22 PM
Yes. The trigger is like the supabase example to populate a user info table in public schema which it sounds like you have. Just on update versus insert.