Re: MERGE Specification

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: MERGE Specification
Дата
Msg-id 8766.1208824097@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: MERGE Specification  (Simon Riggs <simon@2ndquadrant.com>)
Ответы Re: MERGE Specification  (Simon Riggs <simon@2ndquadrant.com>)
Re: MERGE Specification  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-hackers
Simon Riggs <simon@2ndquadrant.com> writes:
> On Mon, 2008-04-21 at 16:38 -0400, A.M. wrote:
>> "MERGE will not invoke Rules." Does this imply that MERGE cannot be  
>> used on views or that the resulting INSERTs or UPDATEs do not work on  
>> views?

> Yes, that's right. Just like COPY.

I find this to be pretty ugly.  COPY is a special case because
(a) it is a utility statement not a plannable one, and (b) its only
reason to exist is to transfer data as fast as possible, so bypassing
rules isn't an unreasonable restriction.  MERGE has neither of those
properties, and thus arguing that it can or should be like COPY is an
entirely unconvincing proposition.  (In fact, I don't even want to think
about what kind of crock you're going to need in order to get it through
the planner without also going through the rewriter.)

Please think a bit harder.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Problem with server/utils/snapmgr.h
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: MERGE Specification