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

From Florian G. Pflug
Subject Re: Automatically assuming a specific role after connecting
Date
Msg-id 444B8542.8080406@phlo.org
Whole thread Raw
In response to Re: Automatically assuming a specific role after connecting to pg  (Stephen Frost <sfrost@snowman.net>)
List pgsql-general
Stephen Frost wrote:
> * Florian G. Pflug (fgp@phlo.org) wrote:
>
>>I'd like to be able to connect to postgres, and automatically assume a
>>specific role.
>
> Couldn't you just have 'SET ROLE <whatever>' in the user's .psqlrc?  At
> least, if that's how they're connecting I think that'd work...
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.

greetings, Florian Pflug

pgsql-general by date:

Previous
From: Wes
Date:
Subject: Concurrency problem building indexes
Next
From: "Florian G. Pflug"
Date:
Subject: Re: Automatically assuming a specific role after connecting