1. Me likey breadsticks...
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jan 2003
    Los Angeles
    Rep Power

    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...
  2. #2
  3. No Profile Picture
    Gödelian monster
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jul 1999
    Central Florida, USA
    Rep Power
    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.
    The real n-tier system:

    FreeBSD -> PostgreSQL -> [any_language] -> Apache -> Mozilla/XUL

    Amazon wishlist -- rycamor (at) gmail.com

IMN logo majestic logo threadwatch logo seochat tools logo