42501
A missing GRANT stops the query before any policy runs.
Scroll, or click the windowScroll, or tap the window
Pick a scenario, choose who is asking, and read the grant and the policy that decided it.
Each one is a real seeded query. Open it, switch who is asking, and read the trace.
A missing GRANT returns 42501. A missing SELECT policy returns an empty result and no error.
Agent as AliceAn MCP tool call runs as the signed-in user. Alice's policies are the boundary for that call.
USING (true)One permissive USING (true) policy is combined with the others using OR, so every granted row leaks.
Silent updateAn UPDATE that can see no existing row changes nothing and raises no error. A SELECT policy is what makes the row visible.
Team notesA note is visible to its owner, or to a member of its team. Personal notes stay personal.
The Data API can look quiet when a grant or a policy is the thing that stopped the row.
A missing GRANT stops the query before any policy runs.
A missing SELECT policy returns an empty result and no error.
Every run is a transaction that rolls back. The sandbox does not keep the edit.
The walkthrough for each scenario is in the tutorial.
It runs the scenario query as the role you pick, with JWT claims set, inside a transaction that always rolls back. The SQL you edit is parsed first. Only policy and grant statements on lab_sandbox are accepted.
A missing SELECT policy, with the grant in place and row level security on, returns no rows and no error. A missing GRANT returns sqlstate 42501 before any policy runs.
No. The list_tasks call uses Alice's client, so Postgres sees Alice's JWT. Her policies are the boundary. There is no separate agent role.
A run rolls back, so the sandbox does not keep it. A share link stores a snapshot of the scenario and the policy SQL. There is no account.
The publishable key only. The page never asks for the secret key. service_role on the switch is a role inside the sandbox, and the warning stays on screen.
Developers, and the agents they run, who need to see whether a row was stopped by a grant or filtered by a policy.
Switch who is asking, edit the policy, and read the trace.