Re: inserting to a multi-table view - Mailing list pgsql-general

From Michael Shulman
Subject Re: inserting to a multi-table view
Date
Msg-id c3f821000806170834l43607e00g2ae6e74e0fdceac9@mail.gmail.com
Whole thread Raw
In response to Re: inserting to a multi-table view  ("Richard Broersma" <richard.broersma@gmail.com>)
Responses Re: inserting to a multi-table view  ("Richard Broersma" <richard.broersma@gmail.com>)
List pgsql-general
On Tue, Jun 17, 2008 at 12:24 AM, Richard Broersma
<richard.broersma@gmail.com> wrote:
> Anyway, here is a link discussing a generalized vertical partitioned
> view.  Perhaps it can give you some idea to get yourself rolling.
> http://archives.postgresql.org/pgsql-general/2006-12/msg01119.php

Thank you very much for pointing this out!  I am somewhat disturbed by
the example in that thread of a "partially executed update" resulting
from the obvious way to write an update rule for a view.  I guess I
need to be calling a function to do it instead, but this again seems
somewhat kludgy.  Perhaps rules are not as wonderful as they seemed
when I first encountered them.

> (I wished that the postgresql update rules where executed as
> serializable transactions, that way if one of the joined tables in
> the view was updated during your change, it would though an
> exception rollback your update instead of writing over the other
> persons work.)

This is also disturbing!  I'm not completely clear on what sort of
overwriting can happen, though; could you give an example or a link?

Are there any plans to fix these problems?  In any case, it seems as
though these sorts of caveats should appear in the documentation.

Mike

pgsql-general by date:

Previous
From: "Michael Shulman"
Date:
Subject: Re: inserting to a multi-table view
Next
From: Scott Ribe
Date:
Subject: Re: Clustering with minimal locking