Search Postgresql Archives

Re: Problem of installation on Mac

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Lizhe.Xu@xxxxxxxxxxxxxx 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@xxxxxxxxxx

Get Sheeky @ http://Sheeky.Biz

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux