Обсуждение: [ADMIN] The same role for multiple databases

Поиск
Список
Период
Сортировка

[ADMIN] The same role for multiple databases

От
Poul Kristensen
Дата:

Hi!

Is it possible to grant some priviliges for a role to multiple databases?

Just to illustrate:
grant all priviliges on database1 to role a. 
grant all priviliges on database2 to role a.


Thanks!

Poul




Re: [ADMIN] The same role for multiple databases

От
John Scalia
Дата:
Yes, (or is that too glib?)

Roles are global in postgresql, so it's just a simple grant assignment.
--
Jay

On Fri, Mar 10, 2017 at 9:16 AM, Poul Kristensen <bcc5226@gmail.com> wrote:

Hi!

Is it possible to grant some priviliges for a role to multiple databases?

Just to illustrate:
grant all priviliges on database1 to role a. 
grant all priviliges on database2 to role a.


Thanks!

Poul





Re: [ADMIN] The same role for multiple databases

От
Poul Kristensen
Дата:
Thanks for fast responce.

Could this iteraction roles, schemas, databases  - e.g. configurations in pg_hba.conf -  between multiple databases and different Postgres minor version e.g. 9.6 to 9.6.1 cause trouble when upgrading still between minor versions? 
An if any potential problems would this be announced in release comments.

Thanks. 



  

2017-03-10 16:17 GMT+01:00 John Scalia <jayknowsunix@gmail.com>:
Yes, (or is that too glib?)

Roles are global in postgresql, so it's just a simple grant assignment.
--
Jay

On Fri, Mar 10, 2017 at 9:16 AM, Poul Kristensen <bcc5226@gmail.com> wrote:

Hi!

Is it possible to grant some priviliges for a role to multiple databases?

Just to illustrate:
grant all priviliges on database1 to role a. 
grant all priviliges on database2 to role a.


Thanks!

Poul








--
Med venlig hilsen / Best regards
Poul Kristensen
Linux-OS/Virtualizationexpert and Oracle DBA

Re: [ADMIN] The same role for multiple databases

От
John Scalia
Дата:
Provided you're just performing a simple pg_upgrade without making schema changes or any wholesale database changes,  then, even if the upgrade is a major version change, you really shouldn't have any issues. At least I've never had any problems with this.
--
Jay

On Mon, Mar 13, 2017 at 5:30 AM, Poul Kristensen <bcc5226@gmail.com> wrote:
Thanks for fast responce.

Could this iteraction roles, schemas, databases  - e.g. configurations in pg_hba.conf -  between multiple databases and different Postgres minor version e.g. 9.6 to 9.6.1 cause trouble when upgrading still between minor versions? 
An if any potential problems would this be announced in release comments.

Thanks. 



  

2017-03-10 16:17 GMT+01:00 John Scalia <jayknowsunix@gmail.com>:
Yes, (or is that too glib?)

Roles are global in postgresql, so it's just a simple grant assignment.
--
Jay

On Fri, Mar 10, 2017 at 9:16 AM, Poul Kristensen <bcc5226@gmail.com> wrote:

Hi!

Is it possible to grant some priviliges for a role to multiple databases?

Just to illustrate:
grant all priviliges on database1 to role a. 
grant all priviliges on database2 to role a.


Thanks!

Poul








--
Med venlig hilsen / Best regards
Poul Kristensen
Linux-OS/Virtualizationexpert and Oracle DBA

Re: The same role for multiple databases

От
Steven Chang
Дата:
hello Poul,

    Why not just create a super user ??
    User is also a role with login privilege.
    You can also grant "your superuser " to "other user" .
    It's more convenient.

Br,
Steven

2017-03-10 23:17 GMT+08:00 John Scalia <jayknowsunix@gmail.com>:
Yes, (or is that too glib?)

Roles are global in postgresql, so it's just a simple grant assignment.
--
Jay

On Fri, Mar 10, 2017 at 9:16 AM, Poul Kristensen <bcc5226@gmail.com> wrote:

Hi!

Is it possible to grant some priviliges for a role to multiple databases?

Just to illustrate:
grant all priviliges on database1 to role a. 
grant all priviliges on database2 to role a.


Thanks!

Poul