Re: Design question - Mailing list pgsql-general

From Chris Travers
Subject Re: Design question
Date
Msg-id 42EB1755.6080500@travelamericas.com
Whole thread Raw
In response to Design question  ("William Harazim" <wharazim@fulcoinc.com>)
List 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

pgsql-general by date:

Previous
From: Richard Sydney-Smith
Date:
Subject: Postgres array types
Next
From: Greg Stark
Date:
Subject: Re: Megabytes of stats saved after every connection