Re: [GENERAL] creating users per database

2006-01-29 Thread Karsten Hilbert
On Sun, Jan 29, 2006 at 02:01:51PM -0500, Tom Lane wrote: > The 8.1 documentation uses the term "role", which seems unlikely to be > confused with Unix groups: ... > Good enough? Yes :-) Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 --

Re: [GENERAL] creating users per database

2006-01-29 Thread Tom Lane
Karsten Hilbert <[EMAIL PROTECTED]> writes: > Aha ! Indeed, the 7.4 documentation wasn't clear enough on > that (for me): > "... The value samegroup specifies that the requested user > must a member of the group with the same name as the > requested database. ..." > Might this be amended to say

Re: [GENERAL] creating users per database

2006-01-29 Thread Karsten Hilbert
On Sat, Jan 28, 2006 at 06:17:16PM -0500, Tom Lane wrote: > > I am using a create_user() SP created by "postgres" with > > "security definer" (gasp). This works just fine, however, it > > transfers createuser rights to *anyone* allowed to connect > > to the database the function is in. > > Not if

Re: [GENERAL] creating users per database

2006-01-28 Thread Tom Lane
Karsten Hilbert <[EMAIL PROTECTED]> writes: > I am using a create_user() SP created by "postgres" with > "security definer" (gasp). This works just fine, however, it > transfers createuser rights to *anyone* allowed to connect > to the database the function is in. Not if you restrict who's allowed

Re: [GENERAL] creating users per database

2006-01-28 Thread Karsten Hilbert
On Sat, Jan 28, 2006 at 11:04:09AM -0500, Tom Lane wrote: > > I have a faint memory of it being possible to create users > > "inside" *one* given database by way of a particular "create > > user" syntax along the lines of: > > create user [EMAIL PROTECTED] ...; > There is the db_user_namespace kl

Re: [GENERAL] creating users per database

2006-01-28 Thread Tom Lane
Karsten Hilbert <[EMAIL PROTECTED]> writes: > I have a faint memory of it being possible to create users > "inside" *one* given database by way of a particular "create > user" syntax along the lines of: > create user [EMAIL PROTECTED] ...; There is the db_user_namespace kluge^H^H^H^H^Hparameter,

Re: [GENERAL] creating users per database

2006-01-28 Thread Philippe Ferreira
Hello, I don't think you can create users *inside* a database, but for each database, you can create global users and make them members of a group having the same name than your database. Then, in pg_hba.conf, the folllowing line will give to your users the permission to connect to the datab