Re: [HACKERS] Rules on table partitions

Поиск
Список
Период
Сортировка
От Dean Rasheed
Тема Re: [HACKERS] Rules on table partitions
Дата
Msg-id CAEZATCXzSBLqDTs3vdeC1tnoG6vRWtMariNEyogTABsdqbVm0A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Rules on table partitions  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Ответы Re: [HACKERS] Rules on table partitions  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Список pgsql-hackers
On 20 June 2017 at 03:01, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> wrote:
> Hmm, yes.  The following exercise convinced me.
>
> create table r (a int) partition by range (a);
> create table r1 partition of r for values from (1) to (10);
> create rule "_RETURN" as on select to r1 do instead select * from r;
>
> insert into r values (1);
> ERROR:  cannot insert into view "r1"
> HINT:  To enable inserting into the view, provide an INSTEAD OF INSERT
> trigger or an unconditional ON INSERT DO INSTEAD rule.
>
> The error is emitted by CheckValidResultRel() that is called on individual
> leaf partitions when setting up tuple-routing in ExecInitModifyTable.
>
> I agree that we should forbid this case, so please find attached a patch.
>

Committed.

Regards,
Dean



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

Предыдущее
От: Konstantin Knizhnik
Дата:
Сообщение: Re: [HACKERS] ASOF join
Следующее
От: Alexander Kuzmenkov
Дата:
Сообщение: Re: [HACKERS] Proposal for CSN based snapshots