Re: BUG #14350: VIEW with INSTEAD OF INSERT TRIGGER and COPY. Missing feature or working as designed.

Поиск
Список
Период
Сортировка
От Dilip Kumar
Тема Re: BUG #14350: VIEW with INSTEAD OF INSERT TRIGGER and COPY. Missing feature or working as designed.
Дата
Msg-id CAFiTN-tdd_DxpdpuHocWPCgxWnGeTBA9-i67hFNE4wmRHEnfrA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #14350: VIEW with INSTEAD OF INSERT TRIGGER and COPY. Missing feature or working as designed.  (Haribabu Kommi <kommi.haribabu@gmail.com>)
Список pgsql-bugs
On Tue, Oct 4, 2016 at 1:07 PM, Haribabu Kommi <kommi.haribabu@gmail.com> wrote:
> I think currently there is no handling of INSTEAD of triggers in the copy
> functionality.
>
> It didn't seem difficult to the support the same, until unless there are any
> problems for complext queries, so after adding the INSTEAD of triggers
> check and calling the ExecIRInsertTriggers function, the Copy is also
> working for the view.
>
> Attached is a POC patch of the same. I didn't checked all the possible
> scenarios.

We support insert into view in below 2 cases..

1. INSTEAD OF INSERT trigger
2. or an unconditional ON INSERT DO INSTEAD rule

In your patch we are supporting first one in COPY command, Will it not
be good to support second one also in COPY command ?

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

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

Предыдущее
От: Grygoriy Gonchar
Дата:
Сообщение: Re: BUG #14397: Updatable VIEW doesn't work with ON CONFLICT from PgPreparedStatement
Следующее
От: bashtanov@imap.cc
Дата:
Сообщение: BUG #14407: pg_attribute shows old column names for indexes