Re: How to create read-only view on 9.3 - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: How to create read-only view on 9.3
Date
Msg-id 520A6BD0.9050804@agliodbs.com
Whole thread Raw
In response to How to create read-only view on 9.3  (Tomonari Katsumata <katsumata.tomonari@po.ntts.co.jp>)
Responses Re: How to create read-only view on 9.3  (David Fetter <david@fetter.org>)
List 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



pgsql-hackers by date:

Previous
From: Jeff Janes
Date:
Subject: Re: danger of stats_temp_directory = /dev/shm
Next
From: Josh Berkus
Date:
Subject: Re: danger of stats_temp_directory = /dev/shm