Re: Automatically assuming a specific role after connecting to pg - Mailing list pgsql-general

From Stephen Frost
Subject Re: Automatically assuming a specific role after connecting to pg
Date
Msg-id 20060423141556.GU4474@ns.snowman.net
Whole thread Raw
In response to Automatically assuming a specific role after connecting to pg  ("Florian G. Pflug" <fgp@phlo.org>)
Responses Re: Automatically assuming a specific role after connecting
List pgsql-general
* Florian G. Pflug (fgp@phlo.org) wrote:
> I can do that with "alter user <user> set role <whatever>" 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 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 (for, say, ODBC, or DBD/DBI in perl, etc.)?  Both?

A generic "set this SQL variable after connecting" might not be a bad
option for psql to have.  I know I'd like to see something like that for
pg_dump and pg_restore so I can "set role" before dumping or restoring.

    Thanks,

        Stephen

Attachment

pgsql-general by date:

Previous
From: "Florian G. Pflug"
Date:
Subject: Re: Automatically assuming a specific role after connecting
Next
From: Stephen Frost
Date:
Subject: Re: Automatically assuming a specific role after connecting to pg