function auth.uid() does not exist
I've got a supabase project which i'm trying to set up some super basic RLS policies, and getting the above error.
Example:
create policy "Enable users to view their own data only"
on "public"."profiles"
as PERMISSIVE
for SELECT
to authenticated
using (
(select auth.uid()) = user_id
);
and get the error:
Failed to run sql query: ERROR: 42883: function auth.uid() does not exist
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
This is when creating it via the supabase UI. No idea how/why this has happened, and the AI assistant has been thus far... unhelpful
Example:
create policy "Enable users to view their own data only"
on "public"."profiles"
as PERMISSIVE
for SELECT
to authenticated
using (
(select auth.uid()) = user_id
);
and get the error:
Failed to run sql query: ERROR: 42883: function auth.uid() does not exist
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
This is when creating it via the supabase UI. No idea how/why this has happened, and the AI assistant has been thus far... unhelpful