Re: One Role, Two Passwords - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: One Role, Two Passwords
Date
Msg-id 20110121021937.GS30352@tamriel.snowman.net
Whole thread Raw
In response to Re: One Role, Two Passwords  (Daniel Farina <drfarina@acm.org>)
Responses Re: One Role, Two Passwords  (Daniel Farina <drfarina@acm.org>)
List pgsql-hackers
* Daniel Farina (drfarina@acm.org) wrote:
> On Thu, Jan 20, 2011 at 6:12 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> > I'm not likely to write a patch for it, but if someone else writes one
> > I would be willing to (a) support it and (b) subject to consensus,
> > commit it.
>
> Wouldn't this require a client application to issue the GUC setting?
> Or could I somehow tell a role "You create objects as this user, and
> you cannot change this."

Errr, well, ok, this is curious.

gis=> alter user sfrost set role gis;
ALTER ROLE
gis=> ^D\q
beren:/home/sfrost> psql --cluster 8.4/main -d gis
psql (8.4.5)
Type "help" for help.

gis=> show role;role
------gis
(1 row)

I'm trying to figure out if that'd help you or not, but it might.  The
problem is that you'd have to change both the login userid and the
password, but you could make everything both those login roles do be
'as' some third role that's the 'real' role for the user.

I'm still looking for 'default owner for schema', but I guess that's
just me.
Thanks,
    Stephen

pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: REVIEW: EXPLAIN and nfiltered
Next
From: Robert Haas
Date:
Subject: Re: REVIEW: EXPLAIN and nfiltered