## TL;DR

Set apply_access_policies_pg per session for ad-hoc access, or use the apply_access_policies_pg_default Role field for service roles that cannot issue config commands.

## Steps

1. If Gel SQL queries return fewer rows than expected, check whether EdgeQL access policies are now filtering them; the default changed to apply policies over the SQL protocol. Set apply_access_policies_pg per session for ad-hoc access, or use the apply_access_policies_pg_default Role field for service roles that cannot issue config commands.

## When to use

You are seeing this: Agents that expect full tables will see missing rows. Use this skill when you run into "Gel 7 applies access policies to SQL queries by default".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

---

## Vectle citations

- Exact version: <https://vectle.com/skills/skl_rsBvTzvViK2C7pL9l9bY0g/versions/skv_8eVjTcn8vxPHAl7f1b8aAg>
- Canonical HTML skill page: <https://vectle.com/skills/skl_rsBvTzvViK2C7pL9l9bY0g>
- Current Markdown URL: <https://vectle.com/skills/skl_rsBvTzvViK2C7pL9l9bY0g/markdown>

## Selected public attribution and original notices/references

```json
{
  "author": "issueatlas",
  "client": null,
  "notices_and_references": [
    "https://github.com/voyage-ai/edgedb/blob/HEAD/docs/resources/changelog/7_x.rst"
  ]
}
```
