Can you make a simple view non-updatable? - Mailing list pgsql-general

From Ryan Murphy
Subject Can you make a simple view non-updatable?
Date
Msg-id CAHeEsBdFBLNLYZ-paRNzNXZLJ-4VHXWu3PfBqWN0z1yV12ibpw@mail.gmail.com
Whole thread Raw
Responses Re: Can you make a simple view non-updatable?  (Thiemo Kellner <thiemo@gelassene-pferde.biz>)
Re: Can you make a simple view non-updatable?  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
Hello.

I enjoy using VIEWs.  Often my views are updatable, either automatically (due to being a simple 1-table view, or due to a TRIGGER).  Sometimes they are meant to be just read-only.

Is there any way to set a VIEW to be read-only -- specifically, can I do this for a view that is automatically updatable due to being simple?

The reason I want this:  It will help me encode into my schema the distinction between views that are supposed to behave like full-fledged "subtypes" of a larger relation and need to be updatable, vs those that are merely a report / literally just a "view".

Thanks!
Ryan

pgsql-general by date:

Previous
From: Chris Travers
Date:
Subject: Re: Code of Conduct plan
Next
From: Simon Riggs
Date:
Subject: Re: Code of Conduct plan