Re: Automatically assuming a specific role after connecting to pg

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>
Cc: Postgresql-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Automatically assuming a specific role after connecting to pg
Date: 2006-04-23 14:15:56
Message-ID: 20060423141556.GU4474@ns.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

* Florian G. Pflug (fgp(at)phlo(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Florian G. Pflug 2006-04-23 17:01:31 Re: Automatically assuming a specific role after connecting
Previous Message Wes 2006-04-23 14:06:59 Concurrency problem building indexes