Skip to content

fix: expose function return tables outside search path#639

Open
aqilaziz wants to merge 1 commit into
supabase:masterfrom
aqilaziz:fix-function-return-external-table
Open

fix: expose function return tables outside search path#639
aqilaziz wants to merge 1 commit into
supabase:masterfrom
aqilaziz:fix-function-return-external-table

Conversation

@aqilaziz
Copy link
Copy Markdown

What changed

  • Includes tables/views referenced by functions on the active search_path in the loaded SQL context, even when the referenced table lives in another schema with USAGE privilege.
  • Keeps non-search-path referenced tables out of root collection and mutation fields while still allowing typed function return values.
  • Adds regression coverage for a function in a2 returning a table row type from a1.

Fixes #455

Verification

  • cargo fmt --check
  • git diff --cached --check

cargo check could not complete in this local environment because pgrx requires $PGRX_HOME and it is not initialized here.

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.

Function returning table from non search_path schema

1 participant