Re: How to create read-only view on 9.3

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: How to create read-only view on 9.3
Date: 2013-08-13 17:24:32
Message-ID: 520A6BD0.9050804@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

All,

> In any case, using permissions is a somewhat leaky bandaid, since
> superusers have overriding access privileges anyway. A better way to do
> what the OP wants might be to have a view trigger that raises an exception.

I think it would be better to supply a script which revoked write
permissions from all views from all users, and distribute it with
PostgreSQL. I think that's doable as a DO $$ script.

If I wrote something like that, where would we drop it?

The fact that it won't revoke permissions from superusers isn't a real
problem, IMNSHO. If anyone is relying on superusers not being able to
do something, they're in for pain in several other areas.

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2013-08-13 17:27:19 Re: danger of stats_temp_directory = /dev/shm
Previous Message Jeff Janes 2013-08-13 16:57:36 Re: danger of stats_temp_directory = /dev/shm