Urgent.News

What's breaking now, across thousands of outlets.

Tech

"infinite recursion detected in policy for relation" in a Supabase app

You added sharing, or teams, or an admin role. Now a page that worked yesterday loads nothing at all, and the console shows this: infinite recursion detected in policy for relation "profiles" with the code 42P17 . Nothing is corrupted and no data is lost, but as Supabase's own documentation puts it, "the query fails for every role the policies apply to", so this is not one unlucky user. One of…

The error "infinite recursion detected in policy for relation profiles" resulted from a Supabase app's row level security (RLS) policy. The policy asked the database a question it couldn't answer, causing PostgreSQL to stop the query to prevent an infinite loop. This issue arose due to a subquery referencing the same table (profiles) within the policy.

To resolve this, administrators were advised to use a security definer function that runs as the role that created it, bypassing RLS. This function checks if the current user is an admin and can then return the appropriate result without triggering the infinite recursion error. By implementing these changes, the policy errors were resolved, and the Supabase app could function correctly.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Your CSP blocks eval. So I wrote a parser.

I needed a graphing calculator that plots sin(2x) + x^2 while you type. The obvious implementation is one line: const y = eval ( expression .

  • Author created an expression parser to bypass Content-Security-Policy headers
  • Parser has four stages: tokenization, RPN conversion, evaluation
  • Goal was functional graphing calculator for dynamic expression input

Cómo saber si un proceso mejoró de verdad (y qué indicadores lo demuestran)

Un proceso mejoró si el mismo indicador, medido igual antes y después, se movió en la dirección que buscabas y se sostiene varias semanas sin que nadie esté empujando.

  • Process improvement measured by stable indicator after change
  • Key indicators: process time, error rate, manual steps, cost per transaction
  • Baseline established using existing records to compare improvements

More from Sunday 15 November →