|
|||||
|
|
#1 |
|
|
the box Redhat 9.0). If I make database calls to Postgresql, as what user is that call going to be made? The user that Apache is running as? Can I specify the user that the call is to be made as? Thanks, --Ulf |
|
|
#2 |
|
|
> If I make database calls to Postgresql, as what user is that call > going to be made? The user that Apache is running as? Can I specify > the user that the call is to be made as? There are two different types of users here 1) The user that the Postgresql database server runs as. This is a system user as defined in the /etc/p***wd file. 2) The database user that you connect to the database as. This is a database defined user, and it not the same as the type of user in (1). When you create a new database you can ***ign a login name and p***word to access that database. When you connect to the database you p*** the login name and p***word as defined in the database to connect to a specific database. This example is from the PHP manual (www.php.net/pg-connect): pg_connect("dbname=mary user=lamb p***word=foo"); In this example you are connecting to a database called "mary" as the user "lamb". That user is who you are connecting to Postgresql as, and is a database defined user, not a system defined one. If you do not specify a login name and p***word that has already been set up in Postgres then you won't be able to connect. -- Chris Hope - The Electric Toolbox - http://www.electrictoolbox.com/ |