Re: [GENERAL] Automatically assuming a specific role after connecting

2006-04-26 Thread Florian G. Pflug
Richard Huxton wrote: Florian G. Pflug wrote: Do you see any other way via which I could archive my desired result? (Apart from modifying every client in existence) Could you modify pgpool to act as a wrapper for this? Hm.. should be possible.. I'll look into this. Thanks for the hint. gree

Re: [GENERAL] Automatically assuming a specific role after connecting

2006-04-24 Thread Richard Huxton
Florian G. Pflug wrote: Do you see any other way via which I could archive my desired result? (Apart from modifying every client in existence) Could you modify pgpool to act as a wrapper for this? -- Richard Huxton Archonet Ltd ---(end of broadcast)---

Re: [GENERAL] Automatically assuming a specific role after connecting

2006-04-23 Thread Florian G. Pflug
Stephen Frost wrote: * Florian G. Pflug ([EMAIL PROTECTED]) wrote: Stephen Frost wrote: Alright, can you describe *exactly* what you'd want to see then? Is this a new command-line option to psql (perhaps something like -v?)? Or do you need it to be supported by libpq through a new connect-str

Re: [GENERAL] Automatically assuming a specific role after connecting

2006-04-23 Thread Stephen Frost
* Florian G. Pflug ([EMAIL PROTECTED]) wrote: > Stephen Frost wrote: > >Alright, can you describe *exactly* what you'd want to see then? Is > >this a new command-line option to psql (perhaps something like -v?)? Or > >do you need it to be supported by libpq through a new connect-string > >option

Re: [GENERAL] Automatically assuming a specific role after connecting

2006-04-23 Thread Florian G. Pflug
Stephen Frost wrote: * Florian G. Pflug ([EMAIL PROTECTED]) wrote: I can do that with "alter user set role " too... But I'd like my users to be able to connect as either role "dev" or role "admin", depending on the task they want to do. Alright, can you describe *exactly* what you'd want to s

Re: [GENERAL] Automatically assuming a specific role after connecting

2006-04-23 Thread Florian G. Pflug
Stephen Frost wrote: * Florian G. Pflug ([EMAIL PROTECTED]) wrote: I'd like to be able to connect to postgres, and automatically assume a specific role. Couldn't you just have 'SET ROLE ' in the user's .psqlrc? At least, if that's how they're connecting I think that'd work... I can do that

Re: [GENERAL] Automatically assuming a specific role after connecting to pg

2006-04-23 Thread Stephen Frost
* Florian G. Pflug ([EMAIL PROTECTED]) wrote: > I'd like to be able to connect to postgres, and automatically assume a > specific role. Couldn't you just have 'SET ROLE ' in the user's .psqlrc? At least, if that's how they're connecting I think that'd work... Enjoy, Ste

Re: [GENERAL] Automatically assuming a specific role after connecting to pg

2006-04-23 Thread Stephen Frost
* Florian G. Pflug ([EMAIL PROTECTED]) wrote: > I can do that with "alter user set role " too... > But I'd like my users to be able to connect as either role "dev" or > role "admin", depending on the task they want to do. Alright, can you describe *exactly* what you'd want to see then? Is this a

Re: [GENERAL] Automatically assuming a specific role after connecting

2006-04-23 Thread Florian G. Pflug
Tom Lane wrote: "Florian G. Pflug" <[EMAIL PROTECTED]> writes: I'd like to be able to connect to postgres, and automatically assume a specific role. Why don't you just connect as that role to begin with? This seems like a pretty low-value frammish. Because I want each user to have his or

Re: [GENERAL] Automatically assuming a specific role after connecting to pg

2006-04-22 Thread Tom Lane
"Florian G. Pflug" <[EMAIL PROTECTED]> writes: > I'd like to be able to connect to postgres, and automatically assume a > specific role. Why don't you just connect as that role to begin with? This seems like a pretty low-value frammish. regards, tom lane ---

[GENERAL] Automatically assuming a specific role after connecting to pg

2006-04-22 Thread Florian G. Pflug
I'd like to be able to connect to postgres, and automatically assume a specific role. I imagine something like create role myuser ; create role dev noinherit ; create role admin noinherit superuser ; grant dev to myuser ; grant admin to myuser ; Now, I'd like a connect as "myuser/admin" to be e