Re: inserting to a multi-table view

From: "Michael Shulman" <shulman(at)mathcamp(dot)org>
To: "Richard Broersma" <richard(dot)broersma(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: inserting to a multi-table view
Date: 2008-06-17 15:34:58
Message-ID: c3f821000806170834l43607e00g2ae6e74e0fdceac9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jun 17, 2008 at 12:24 AM, Richard Broersma
<richard(dot)broersma(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Cyril SCETBON 2008-06-17 15:52:51 Re: Error when trying to drop a tablespace
Previous Message Michael Shulman 2008-06-17 15:15:23 Re: inserting to a multi-table view