Make one column publicly selectable

Hi, I have a table
Users
that contains several columns, all of which are restricted to allow only an authenticated user to access their own data, however, I want only one column, 'usernames' to be publicly selectable. How can I do this? I looked at the alpha feature column-level privileges, but couldn't get that to work for what I need.

Below are the current policies in place on that users table:

  1. Allow authenticated users to select their data.```sqlalter policy "Allow authenticated users to select their data"on "public"."users"to authenticatedusing ((( SELECT auth.uid() AS uid) = user_id));```
  2. Allow authenticated users to update their data.```sqlalter policy "Allow authenticated users to update their data"on "public"."users"to authenticatedusing ((( SELECT auth.uid() AS uid) = user_id));```
Was this page helpful?