Re: SQL/MED - core functionality

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SQL/MED - core functionality
Дата
Msg-id 26252.1292338773@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: SQL/MED - core functionality  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, Dec 14, 2010 at 9:42 AM, Itagaki Takahiro
> <itagaki.takahiro@gmail.com> wrote:
>> We need RULEs or INSTEAD OF TRIGGERs to support updatable foreign tables.

> We do?  Why can't the support for updating foreign tables be built-in
> rather than trigger-based?

It *has* to be built in.  What exactly would you imagine a rule or
trigger is going to do?  It won't have any below-SQL-level access to the
foreign table with which it could issue some magic command that's not
spelled UPDATE; and even if it did, why wouldn't you just spell that
command UPDATE?

There would be value in being able to fire triggers on foreign-table
updates just like you can on local tables.  It might well be that that
would just fall out of the implementation, since triggers are handled at
the top level of the executor, which shouldn't need to know the
difference.  But if it doesn't fall out easily, I don't mind postponing
that feature till later.
        regards, tom lane


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Transaction-scope advisory locks
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Transaction-scope advisory locks