Re: [GENERAL] update view - Mailing list pgsql-general

From Mike Mascari
Subject Re: [GENERAL] update view
Date
Msg-id 383F4FDE.71567C65@mascari.com
Whole thread Raw
In response to update view  ("Brian Haney" <brian@cybernaut.com>)
List pgsql-general
Brian Haney wrote:

> I'm trying to update a table through a view and have read up on what
> constitutes an 'updatable' view.  I created a simple test case and cannot
> get it to update the table through the view.  In the transcript below,
> notice that when I update the view, I get 'UPDATE 0' with no error message
> or other complaints.  What am I missing?  Does PostgreSQL not support
> updating through views?

It does, but you must supply the RULE for what should happen in the event of
an INSERT, UPDATE, or DELETE. See Chapter 35 in the Programmer's Guide - The
Postgres Rule System, the section entitled "Rules on INSERT, UPDATE and
DELETE".

Hope that helps,

Mike



pgsql-general by date:

Previous
From: "Brian Haney"
Date:
Subject: update view
Next
From: Stuart Rison
Date:
Subject: Re: [GENERAL] can I do this.