pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Granting a user the privilege to create views?
3+ messages / 3 participants
[nested] [flat]

* Granting a user the privilege to create views?
@ 2018-08-28 08:48 Olivier Macchioni <olivier.macchioni@wingo.ch>
  2018-08-28 09:00 ` Re: Granting a user the privilege to create views? pavan95 <pavan.postgresdba@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Olivier Macchioni @ 2018-08-28 08:48 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

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 <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 <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=

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Granting a user the privilege to create views?
  2018-08-28 08:48 Granting a user the privilege to create views? Olivier Macchioni <olivier.macchioni@wingo.ch>
@ 2018-08-28 09:00 ` pavan95 <pavan.postgresdba@gmail.com>
  2018-08-28 09:46   ` Re: Granting a user the privilege to create views? Thomas Boussekey <thomas.boussekey@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: pavan95 @ 2018-08-28 09:00 UTC (permalink / raw)
  To: pgsql-general

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




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Granting a user the privilege to create views?
  2018-08-28 08:48 Granting a user the privilege to create views? Olivier Macchioni <olivier.macchioni@wingo.ch>
  2018-08-28 09:00 ` Re: Granting a user the privilege to create views? pavan95 <pavan.postgresdba@gmail.com>
@ 2018-08-28 09:46   ` Thomas Boussekey <thomas.boussekey@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Thomas Boussekey @ 2018-08-28 09:46 UTC (permalink / raw)
  To: pavan.postgresdba@gmail.com; +Cc: pgsql-general

Hello Olivier,

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

Link to the CREATE EVENT TRIGGER documentation:
https://www.postgresql.org/docs/current/static/sql-createeventtrigger.html

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
>
>

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2018-08-28 09:46 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-08-28 08:48 Granting a user the privilege to create views? Olivier Macchioni <olivier.macchioni@wingo.ch>
2018-08-28 09:00 ` pavan95 <pavan.postgresdba@gmail.com>
2018-08-28 09:46   ` Thomas Boussekey <thomas.boussekey@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox