Обсуждение: Granting a user the privilege to create views?

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

Granting a user the privilege to create views?

От
Olivier Macchioni
Дата:
Hello dear list,

Context: 

PostgreSQL instance, version 10.1 used for Datawarehousing.

We have an ETL system loading lots of data on this instance, with all kind of business metrics. For most of the data, we're using a snowflake schema (https://en.wikipedia.org/wiki/Snowflake_schema)

Some users have read-only access to the DB and use various reporting tools to extract valuable information.

In order to do this, they do a lot of JOIN... all the time. They expressed the wish to be able to create VIEWS to simplify their SQL requests. Obviously I would like to allow them to do so. My understanding (based on reading the documentation and one some posts like  https://stackoverflow.com/questions/19811683/cannot-grant-create-view-on-schema) is that it's currently not possible to grant them only this additional privilege.

Is it still the case?... Do you know any practical workaround which I could use?

Thank you,

Olivier

Re: Granting a user the privilege to create views?

От
pavan95
Дата:
Hi Olivier,

Instead if you grant select privilege on a table to a particular user, he
can be able to create whatever the views he wants to. 

Regards,
Pavan



--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html


Re: Granting a user the privilege to create views?

От
Thomas Boussekey
Дата:
Hello Olivier,

You can write an event trigger that will prevent specific user to create objects that are not views.


Regards,
Thomas

Le mar. 28 août 2018 à 11:00, pavan95 <pavan.postgresdba@gmail.com> a écrit :
Hi Olivier,

Instead if you grant select privilege on a table to a particular user, he
can be able to create whatever the views he wants to.

Regards,
Pavan



--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html