Sven Sporer <[EMAIL PROTECTED]> writes:
> 2) How do you restrict the users of a specific database to touch only
> the objects in their database?
They *are* so restricted. Your problem is that roles are
installation-wide, not local to a particular database, and
so you cannot enforce the restriction you hope for: CREATEROLE
privilege is inherently to do with installation-wide actions.
A possible workaround is to ensure that every user owns at least
one object in "his" database -- table, function, whatever. Then
it's not possible to drop the user without having first gotten
into that database. (As of 8.1 or so --- this wasn't enforced
before that.) However a user with CREATEROLE can still cause all
sorts of mischief with ALTER USER, so preventing only the DROP case
probably isn't that helpful. Bottom line is you don't give out that
privilege to people you don't trust.
If you need better separation among groups of users, give them each
their own installation (postmaster).
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match