Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The difference is that postgres can enforce this for arbitrary queries.

This doesn't matter in the typical webapp where all accesses to the DB happen through the same database user id, but when actually using the user system of the DB, it allows for fine grained access control to a common data set.

The closest you have without explicit RLS support is to create a view for each user. RLS generates per-user views on demand under a common name.



I use schemas[0] for this. Could someone explain what advantage is gained from RLS in comparison, either to views or schemas?

[0] http://www.postgresql.org/docs/current/static/ddl-schemas.ht...


I am very familiar with RLS, but not schemas. Could you provide an example of how you would use schemas? If not too much trouble, could you also use my salesperson example from my other comments?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: