Re: Problem of installation on Mac - Mailing list pgsql-general

From Shane Ambler
Subject Re: Problem of installation on Mac
Date
Msg-id 471ACD87.7020002@Sheeky.Biz
Whole thread Raw
In response to Re: Problem of installation on Mac  (Lizhe.Xu@aphis.usda.gov)
List pgsql-general
Lizhe.Xu@aphis.usda.gov wrote:
> If I understand correctly, the user "pgsql", besides having its own file
> system not related to others, is the administrator of the postgresql db
> administrator. Only "pgsql" can modify the db, but the other users can
> query the db but not modify it. Am I rigth? What I should do, if other
> users need to update the db. Thank you very much.
>

I might just clarify this a little as some find it confusing - you have
two user accounts with the name pgsql, one is a system user account the
other is a postgresql database user. The two account names are
completely separate and don't need to have the same names.

The postgresql server (the program itself running on your machine) is
run using the system pgsql account allowing the server to have access to
your file system based on the privileges setup on for your system user
account.

The pgsql database user account is used to determine who can connect to
the postgresql server through a client application (whether run remotely
or from the same machine) and what data held within the postgresql
server they can access.

You can create other database users and specify what they can access and
what tasks they can perform. So you would keep pgsql as the admin user
with unlimited access to all db's and then create a user1 account and
then say that user1 can connect to mydb1 and can select, insert and
update data in mydb1. You can then create user2 and say they can connect
to mydb1 and can only perform selects on mydb1.

Within postgresql these user accounts are referred to as roles - see the
manual on CREATE ROLE for more info.
http://www.postgresql.org/docs/8.2/interactive/sql-createrole.html



--

Shane Ambler
pgSQL@Sheeky.Biz

Get Sheeky @ http://Sheeky.Biz

pgsql-general by date:

Previous
From: Michael Glaesemann
Date:
Subject: Re: uniquely indexing Celko's nested set model
Next
From: "Trevor Talbot"
Date:
Subject: Re: 8.2.3: Server crashes on Windows using Eclipse/Junit