Have good support for Views with non-nullable foreign key relationships #50597
Unanswered
brandonchinn178
asked this question in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Exposing non-nullable table columns in views has been asked before (https://github.com/orgs/supabase/discussions/13279, https://github.com/orgs/supabase/discussions/14151), and the current guidance is "It's a Postgres limitation, we have to workaround it". However, even if Postgres doesn't support it, it would be nice if supabase's type generation had a special carve-out for it.
Our current workaround is to cast the columns into non-nullable types like
This works, but now the foreign key relationship is destroyed and PostgREST is unable to find the relationship between
active_postsandusers.All reactions