Skip to content

docs(fdw): fix has_permission filter examples - #3237

Open
capybara-alt wants to merge 1 commit into
authzed:mainfrom
capybara-alt:docs/fix-fdw-has-permission-examples
Open

docs(fdw): fix has_permission filter examples#3237
capybara-alt wants to merge 1 commit into
authzed:mainfrom
capybara-alt:docs/fix-fdw-has-permission-examples

Conversation

@capybara-alt

Copy link
Copy Markdown
Contributor

Fixes #3236

The documented AND has_permission = true examples fail when run: Postgres
folds = true into a bare column reference before pushdown, and the proxy
rejects has_permission in WHERE clauses.

Changes

  • README.md: use has_permission IS true in the Lookup Resources / Lookup
    Subjects examples — IS TRUE is not pushed down by postgres_fdw and gets
    evaluated locally, so the query works as intended.
  • Architecture.md: drop the has_permission condition from the
    handler-dispatch and cursor examples entirely — these show SQL as received
    by the proxy, where no local filtering exists and neither form is supported.

Testing

Verified against a live setup (SpiceDB + FDW proxy + Postgres 17 with
postgres_fdw): the original examples fail with operation not supported: column_ref, the updated README examples return the expected rows
(EXPLAIN VERBOSE confirms IS TRUE becomes a local Filter node), and the
updated Architecture.md queries dispatch to LookupResources/LookupSubjects.

@capybara-alt
capybara-alt requested a review from a team as a code owner July 15, 2026 17:09
@josephschorr

Copy link
Copy Markdown
Member
  • README.md: use has_permission IS true in the Lookup Resources / Lookup
    Subjects examples — IS TRUE is not pushed down by postgres_fdw and gets
    evaluated locally, so the query works as intended.

Is this being added solely to make sure the "missing caveat context" results are not included?

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

postgres-fdw docs: has_permission = true examples do not work

2 participants