On 1999-11-29, Alexey V. Meledin mentioned:
> 1. I create a database from my script and must GRANT all
> tables, subsequences, indexes (amount 100) to some users I need.!
> Yehh... GRANT does not allow me to grant all tables during one query.
> If there any function(procedure) to do this for all tables, indexes
> and etc. for one query?
Your best bet would be an external script such as this Perl thingy:
use Pg;
$database = Pg::connectdb("...");
$query = $database->exec("SELECT tablename FROM pg_tables");
while (($name) = $query->fetchrow) {
$res = $database->exec("GRANT all ON $name TO ???");
}
__END__
There are a few TODO items of the nature "make <command> act on several
tables at once", so one fine day it might be taken care of.
> 2.1. I do "create user with password"
> In pg_shadow this user has name "user1" and passwd "user1". All OK.
> But user can go in without password at all. Why?
You must instruct the backend to use password authentication. See
pg_hba.conf(5).
> 2.2. I want to give to users possibility to change their passwords.
> But I don't know how and is it posible at all?!
There's no really good way without making your users superusers. That is
admittedly a deficiency.
--
Peter Eisentraut Sernanders väg 10:115
[EMAIL PROTECTED] 75262 Uppsala
http://yi.org/peter-e/ Sweden
************