Hi guys, can someone explain to me what an infinit...
# help
n
Hi guys, can someone explain to me what an infinite recursion on a policy means? I'm struggling to make sense of it. For example, I have a clubs table with FK relationships on club_id to clubs_users and clubs_invites. I am attaching the policies for the three tables mentioned. When doing a GET on clubs, I get a "infinite recursion detected in policy for relation \"clubs\"
n
Hello @nieldv! 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.
g
With out figuring out what you are trying to do, infinite recursion is because you have a select policy on table1 using table2 in its policy and then the select policy on table2 using table1 in its policy. Can't work. You probably can use a "stable security definer" function to evaluate the part that is causing the recursion. It bypasses RLS do its check.
n
nieldv (2022-04-17)