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

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org

Reply via email to