From: | "Michael Shulman" <shulman(at)mathcamp(dot)org> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: what are rules for? |
Date: | 2008-06-25 17:22:57 |
Message-ID: | c3f821000806251022m3db832f7s286c429d723de5ef@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Jun 24, 2008 at 11:08 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> To expand on that: it's pretty hard to see how update or delete triggers
> on a view would work. Insert is easy, because if left to its own
> devices the system would in fact try to insert a tuple into the view
> relation, and that action could fire a trigger which could redirect the
> insertion someplace else. But updates and deletes require a
> pre-existing target tuple, and there just aren't any of those in a view
> relation. (Another way to say it is that update/delete require a CTID
> column, which a view hasn't got.)
But isn't the CTID column only required in order for the executor to
actually *do* the update or delete? And since with a view, there is
nothing to actually update or delete in the view itself, the trigger
would be doing the only actual updating or deleting, so where would
the CTID column be needed?
Perhaps this is the same as the "instead trigger" suggestion -- I'm
not familiar with Oracle.
Mike
From | Date | Subject | |
---|---|---|---|
Next Message | Nick | 2008-06-25 18:01:50 | Creating a VIEW with a POINT column |
Previous Message | David Siebert | 2008-06-25 16:33:24 | Re: Probably been asked a hundred times before. |