Search Postgresql Archives

Re: what are rules for?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 24, 2008 at 11:08 AM, Tom Lane <tgl@xxxxxxxxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux