Hi, I'm trying to left join profile data with a re...
# help
m
Hi, I'm trying to left join profile data with a reservation_request table with an RLS policy. Do I need to apply multiple RLS policies (one for profile and another for reservation_requests)
n
Hello @mangysaurus! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
/title
command! We have solved your problem? Click the button below to archive it.
m
create policy user_can_view_reservation_request on reservation_requests for select using ( Exists( select * from reservation_requests rr left join profile on profile.id = rr.user_id where rr.user_id = auth.uid() ) );
g
I think your bigger problem if I read it correctly is you are setting a select policy n reservation_requests, but then in the policy try to select from reservation_requests which is recursive and won't work.
n
mangysaurus (2022-04-26)
m
Thanks for the help
m
I'm tripping myself up in ramping up on policies and left joins. Thanks