Re: delta relations in AFTER triggers

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: delta relations in AFTER triggers
Дата
Msg-id CAEepm=1cEwfGdJF8npCF1gZg619QS7hh5q+9dxz0PePg1-jOsw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] delta relations in AFTER triggers  (Thomas Munro <thomas.munro@enterprisedb.com>)
Список pgsql-hackers
On Fri, Mar 24, 2017 at 5:36 PM, Thomas Munro
<thomas.munro@enterprisedb.com> wrote:
> On Fri, Mar 24, 2017 at 1:14 PM, Thomas Munro
> <thomas.munro@enterprisedb.com> wrote:
>> If that's fixed and the permissions question can be waved away by
>> saying it's the same as the per-row situation, my only other comment
>> would be a bikeshed issue: Enr isn't a great name for a struct.
>
> One more thought: should this be allowed?
>
> postgres=# create table mytab (i int) partition by list (i);
> CREATE TABLE
> postgres=# create table mytab1 partition of mytab for values in (42);
> CREATE TABLE
> postgres=# create function my_trigger_function() returns trigger as $$
> begin end; $$ language plpgsql;
> CREATE FUNCTION
> postgres=# create trigger my_trigger after update on mytab referencing
> old table as my_old for each statement execute procedure
> my_trigger_function();
> CREATE TRIGGER

On second thoughts, that's actually arguably a bug in committed code.
What do you think about the attached patch?

-- 
Thomas Munro
http://www.enterprisedb.com

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: WIP: Faster Expression Processing v4
Следующее
От: Corey Huinker
Дата:
Сообщение: Re: \if, \elseif, \else, \endif (was Re: PSQL commands:\quit_if, \quit_unless)