Re: Design question

From: Chris Travers <chris(at)travelamericas(dot)com>
To: William Harazim <wharazim(at)fulcoinc(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Design question
Date: 2005-07-30 05:59:49
Message-ID: 42EB1755.6080500@travelamericas.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

William Harazim wrote:

> My company is looking to use PostgreSQL in place of our existing system.
> We currently house data for multiple clients. All of their data is
> stored in a single database in different schemas for each client.
> Mosts clients have multiple login accounts, which we maintain in a
> database-specific USER table (contains full name, company, last login,
> etc).
>
> Q: is the PostgreSQL pg_user table the appropriate place for these
> types of users, or would it be better design to have a generic
> "client" login which subsequently references a second USER table?
>
The pg_user table contains a list of database accounts. You very well
could put the users here and give each one a login. This would give you
an ability to apply permission to distinnct users of the database. The
down side is that this table has no company field, etc. so you might
want to create another table, perhaps is a special schema, to include
this information and then use rules to make this updateable. You might
need to use functions to create users when new users are added to this
view or alter them when the user is altered.

Does this make sense? Is it what you are trying to accomplish?

Best Wishes,
Chris Travers
Metatron Technology Consulting

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2005-07-30 14:23:47 Re: Megabytes of stats saved after every connection
Previous Message Richard Sydney-Smith 2005-07-30 03:36:16 Postgres array types