Skip to content

fix: apply idsFilter when retrieving a foreign table by id - #1123

Open
hsusul wants to merge 1 commit into
supabase:masterfrom
hsusul:fix/foreign-table-retrieve-by-id
Open

fix: apply idsFilter when retrieving a foreign table by id#1123
hsusul wants to merge 1 commit into
supabase:masterfrom
hsusul:fix/foreign-table-retrieve-by-id

Conversation

@hsusul

@hsusul hsusul commented Aug 27, 2026

Copy link
Copy Markdown

What kind of change does this PR introduce?

Bug fix.

Why?

foreignTables.retrieve({ id }) built idsFilter but never passed it to FOREIGN_TABLES_SQL. With more than one foreign table, GET /foreign-tables/:id returned data[0] instead of the requested OID.

Fixes #1121.

How?

Forward idsFilter into FOREIGN_TABLES_SQL, matching views/tables/materialized views.

Checklist

  • Bug fix
  • Tests added
  • Docs
  • Breaking change

retrieve({ id }) built the filter but never passed it into FOREIGN_TABLES_SQL, so the first foreign table was returned.
@hsusul
hsusul requested review from a team, avallete and soedirgo as code owners August 27, 2026 15:00
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.

foreignTables.retrieve by id returns the wrong table when more than one exists

1 participant