Re: parent foreign tables and row marks

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Re: parent foreign tables and row marks
Дата
Msg-id CA+HiwqE+Jcs7M=+sp_vmoCm6jMVzT7iUEFXO=TDtL5n1K2wO0w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: parent foreign tables and row marks  (Amit Langote <amitlangote09@gmail.com>)
Список pgsql-hackers
On Thu, Jun 3, 2021 at 10:07 AM Amit Langote <amitlangote09@gmail.com> wrote:
> On Thu, Jun 3, 2021 at 3:39 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >
> > Amit Langote <amitlangote09@gmail.com> writes:
> > > I noticed that 428b260f87e8 (v12) broke the cases where a parent
> > > foreign table has row marks assigned.
> >
> > Indeed :-(.  Fix pushed.  I tweaked the comments and test case slightly.
>
> Thank you.

Ah, I had forgotten to propose that we replace the following in the
preprocess_targetlist()'s row marks loop:

        /* child rels use the same junk attrs as their parents */
        if (rc->rti != rc->prti)
            continue;

by an Assert as follows:

+       /* No child row marks yet. */
+       Assert (rc->rti == rc->prti);

I think the only place that sets prti that is != rti of a row mark is
expand_single_inheritance_child() and we can be sure that that
function now always runs after preprocess_targetlist() has run.
Attached a patch.

Thoughts?

-- 
Amit Langote
EDB: http://www.enterprisedb.com

Вложения

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Fixup some appendStringInfo and appendPQExpBuffer calls
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: speed up verifying UTF-8