Schemas and Privileges
Been stuck with development on pretty old PG here at work so I haven't had a chance to mess with schemas much, but after reading a couple docs on them from postgresql.org I'm wondering if anyone can give some more insight into them.
In particular I'm wondering what advantages schemas have over user/group privilges (they're not mutually exclusive right?). I can see schemas as a better way of organizing tables into recognizable groups of data as well as priviliges, but what more am I missing? Are there any current projects out there that I can take a look at that utilize schemas and display why they're so special?
PostgreSQL, it's what's for dinner...
June 10th, 2003, 08:22 AM
Schemas are not mutually exclusive with user'group privileges.
Schemas are simply a way to add an extra level of nesting to your database objects, thus allowing for different namespaces inside the same database. Essentially, schemas are just namespaces. So, you can write queries which refer to more than one namespace, with [schema].[tablename].columnname]. This also allows for objects in different schemas to have the same name, without conflict, and thus for different users or groups to have objects by the same name, but with different contents.