Re: Managing users

From: Sai Hertz And Control Systems <sank89(at)sancharnet(dot)in>
To: C G <csgcsg39(at)hotmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Managing users
Date: 2003-12-05 11:29:23
Message-ID: 3FD06C13.9020507@sancharnet.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Dear C G ,

> Forgive me if this is a silly question, but I need some advice.

Forgiveness granted :-)

> I'm thinking of creating three groups (Level1 to Level3) for the 3
> types of users. Is this the best way of doing this?

Yes without doubt to my experience this is a better method

>
> If a user logs on, say through a web interface, would I have a table
> with username/passwd to check the login to the database? Or should I
> somehow use the pg_user table?

Considering you are using PHP +PostgreSQL

You can use the pg_user table
Just you have to do is
1. Make two cookies variable each storing the password and user name
2. Now in the Database connection string use the user name as the var in
Cookie and password same so it would be like
pg_connect(blah , blah user name=$COOKIE_VAR_USERNAME , password
=$COOKIE_VAR_PASSWORD)
Benefits
1. You will be able to use current_user() function
2. No user management system required PostgreSQL user is ur web user
3. PostgreSQL group will define levels

>
> Also, is there a way of monitoring how much memory a user takes up.
> For example, I have a table username/Data. How much memory does each
> username take up on that table?

I doubt but you may see
contrib/database_size function

If this helps then pass on the word "PostgreSQL is Walah !" and kindly
shoot back

Regards,
V Kashyap

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Sai Hertz And Control Systems 2003-12-05 12:53:56 Re: Managing users
Previous Message C G 2003-12-05 10:46:09 Managing users