Thread

  1. What's the point of multiple databases?

    Martin Maney <maney@pobox.com> — 2000-06-27T05:11:32Z

    I hope I don't regret too much not waiting for morning and a fresh take on
    all this.  :-)
    
    So I've got this nice new postgreSQL and it seems to be working nicely. 
    I've setup a user identity with create database priviliges, and set out to
    setup a couple databases for separate projects I want to work on.  That's
    what separately named databases are for, right?
    
    Well, maybe it's just a quirk of the utilities (psql and pgaccess), but it
    seems that no matter which database I open, I can see and access all the
    tables in any database created by this user.  This seems, well, wrong.
    
    This is from the Debian "potato" install, which is based on 6.5.3.  All I
    need is a sanity check, please: is this doable, or is there no point in
    setting up more than one database per postgres user?
    
    Thanks!
    
    
  2. Re: What's the point of multiple databases?

    Martijn van Oosterhout <kleptog@cupid.suninternet.com> — 2000-06-29T13:18:09Z

    Martin Maney wrote:
    > 
    > I hope I don't regret too much not waiting for morning and a fresh take on
    > all this.  :-)
    > 
    > So I've got this nice new postgreSQL and it seems to be working nicely.
    > I've setup a user identity with create database priviliges, and set out to
    > setup a couple databases for separate projects I want to work on.  That's
    > what separately named databases are for, right?
    > 
    > Well, maybe it's just a quirk of the utilities (psql and pgaccess), but it
    > seems that no matter which database I open, I can see and access all the
    > tables in any database created by this user.  This seems, well, wrong.
    > 
    > This is from the Debian "potato" install, which is based on 6.5.3.  All I
    > need is a sanity check, please: is this doable, or is there no point in
    > setting up more than one database per postgres user?
    
    First, show us what you're seeing. Next, if you create something
    in the template1 DB, then it will appear in all newly created
    databases...
    
    HTH,
    
    -- 
    Martijn van Oosterhout <kleptog@cupid.suninternet.com>
    http://cupid.suninternet.com/~kleptog/
    
    
  3. Re: What's the point of multiple databases?

    D. Duccini <duccini@backpack.com> — 2000-06-29T14:05:02Z

    I kind of wondered about the visibility thing as well....but never got
    around to really sorting through it.
    
    What we use it for is CGI script privileges.  Each user in effect is a
    database "realm" and therefore allows you to have tables with the same
    names as tables in other 'realms'
    
    Barring a full blown permissions system (users, groups, read/write/exec
    privs) i'm not sure what the postgresql roadmap has in store
    
    -duck
    
    
    On Tue, 27 Jun 2000, Martin Maney wrote:
    
    > I hope I don't regret too much not waiting for morning and a fresh take on
    > all this.  :-)
    > 
    > So I've got this nice new postgreSQL and it seems to be working nicely. 
    > I've setup a user identity with create database priviliges, and set out to
    > setup a couple databases for separate projects I want to work on.  That's
    > what separately named databases are for, right?
    > 
    > Well, maybe it's just a quirk of the utilities (psql and pgaccess), but it
    > seems that no matter which database I open, I can see and access all the
    > tables in any database created by this user.  This seems, well, wrong.
    > 
    > This is from the Debian "potato" install, which is based on 6.5.3.  All I
    > need is a sanity check, please: is this doable, or is there no point in
    > setting up more than one database per postgres user?
    > 
    > Thanks!
    > 
    
    
    -----------------------------------------------------------------------------
    david@backpack.com            BackPack Software, Inc.        www.backpack.com
    +1 651.645.7550 voice       "Life is an Adventure.    
    +1 651.645.9798 fax            Don't forget your BackPack!"   
    -----------------------------------------------------------------------------
    
    
    
  4. Re: What's the point of multiple databases?

    Martin Maney <maney@pobox.com> — 2000-06-29T20:25:57Z

    On Thu, Jun 29, 2000 at 11:18:09PM +1000, Martijn van Oosterhout wrote:
    > First, show us what you're seeing. Next, if you create something
    > in the template1 DB, then it will appear in all newly created
    > databases...
    
    Thanks to everyone who responded.  I can't figure out how it happened, but
    apparently the "manufacturer" table had gotten created in the template
    database... but it was created AFTER at least one of the databases had been
    itself created, so why was the table copied to that one?  Oh well, at least
    after dropping the unwanted copies it's all working as I had expected it
    should.