Re:When you browse Instagram and find Tony Abbott's passport...
by mulmen on Wednesday September 16, 2020 @05:40AM
(#24491051)
Take a look at Postgres roles, I think they are similar to what you describe. This should allow you to set row level permissions per user. Not sure how well that scales.
I know postgrest uses it.
https://www.postgresql.org/docs/12/user-manag.html