Skip to content

fix: filter relationship SQL by nspname, not regnamespace::text - #1149

Open
hsusul wants to merge 1 commit into
supabase:masterfrom
hsusul:fix/relationships-schema-filter-nspname
Open

fix: filter relationship SQL by nspname, not regnamespace::text#1149
hsusul wants to merge 1 commit into
supabase:masterfrom
hsusul:fix/relationships-schema-filter-nspname

Conversation

@hsusul

@hsusul hsusul commented Sep 6, 2026

Copy link
Copy Markdown

Summary

  • Fixes Relationship column lists are null for dotted/mixed-case schemas #1147: dotted / mixed-case schemas made connamespace::regnamespace::text miss schemaFilter, leaving FK columns / referenced_columns null for typegen.
  • Filter via pg_namespace.nspname (and oid subquery in views key deps); drop the redundant lateral regnamespace filter now covered by the outer ns1.nspname predicate.
  • Adds relationship list regression tests for "odd.schema" and "MySchema".

Test plan

  • npx vitest run test/index.test.ts -t "relationships list includes columns"
  • Generate types for a schema with a dot in the name and confirm FK relationships include column names

Quoted schema names (dotted or mixed-case) made schemaFilter miss and
left FK column lists null for typegen.
@hsusul
hsusul requested review from a team, avallete and soedirgo as code owners September 6, 2026 06:52
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.

Relationship column lists are null for dotted/mixed-case schemas

1 participant