I created a custom function to get a user by its id:
CREATE OR REPLACE FUNCTION public.get_user_id_by_email(user_email text) RETURNS uuid LANGUAGE plpgsqlAS $function$declare user_id uuid;begin select id from auth.users where email = user_email into user_id; return user_id;end;$function$;
CREATE OR REPLACE FUNCTION public.get_user_id_by_email(user_email text) RETURNS uuid LANGUAGE plpgsqlAS $function$declare user_id uuid;begin select id from auth.users where email = user_email into user_id; return user_id;end;$function$;
However, when trying to execute it using the RPC function I got the following error:
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.