teams and team_members tables.teams has an RLS policy for SELECT statements meaning only members of that team can read it (if currently authed user is present in the team_members table). There's also a similar policy on team_members.authenticated user to INSERT into teams, and then a trigger will add a row to team_members with the user that created the team. Simple enough..select() from the insert - the trigger has not yet been run and therefore no record exists in team_members.