Re: partition routing layering in nodeModifyTable.c

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Re: partition routing layering in nodeModifyTable.c
Дата
Msg-id CA+HiwqEAXnnbZr8=g7FmqVoXGDwU6Rs1NHMvw5qtbMiB3TKwWQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: partition routing layering in nodeModifyTable.c  (Etsuro Fujita <etsuro.fujita@gmail.com>)
Ответы Re: partition routing layering in nodeModifyTable.c  (Etsuro Fujita <etsuro.fujita@gmail.com>)
Список pgsql-hackers
Fujita-san,

Thanks for the quick follow up.

On Wed, Aug 7, 2019 at 11:30 AM Etsuro Fujita <etsuro.fujita@gmail.com> wrote:
> On Wed, Aug 7, 2019 at 10:24 AM Amit Langote <amitlangote09@gmail.com> wrote:
> > * Regarding setting ForeignScan.resultRelIndex even for non-direct
> > modifications, maybe that's not a good idea anymore.  A foreign table
> > result relation might be involved in a local join, which prevents it
> > from being directly-modifiable and also hides the ForeignScan node
> > from being easily modifiable in PlanForeignModify.  Maybe, we should
> > just interpret resultRelIndex as being set only when
> > direct-modification is feasible.
>
> Yeah, I think so; when using PlanForeignModify because for example,
> the foreign table result relation is involved in a local join, as you
> mentioned, ForeignScan.operation would be left unchanged (ie,
> CMD_SELECT), so to me it's more understandable to not set
> ForeignScan.resultRelIndex.

OK.

> > Should we rename the field
> > accordingly to be self-documenting?
>
> IMO I like the name resultRelIndex, but do you have any better idea?

On second thought, I'm fine with sticking to resultRelIndex.  Trying
to make it self documenting might make the name very long.

Here are the updated patches.

Thanks,
Amit

Вложения

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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: no default hash partition
Следующее
От: Amit Langote
Дата:
Сообщение: Re: remove "msg" parameter from convert_tuples_by_name