Re: what are rules for?

Поиск
Список
Период
Сортировка
От Michael Shulman
Тема Re: what are rules for?
Дата
Msg-id c3f821000806251022m3db832f7s286c429d723de5ef@mail.gmail.com
обсуждение исходный текст
Ответ на Re: what are rules for?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: what are rules for?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Tue, Jun 24, 2008 at 11:08 AM, Tom Lane <tgl@sss.pgh.pa.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

В списке pgsql-general по дате отправления:

Предыдущее
От: David Siebert
Дата:
Сообщение: Re: Probably been asked a hundred times before.
Следующее
От: Andrew
Дата:
Сообщение: 0xc3 error Text Search Windows French