Re: Optimizing nested ConvertRowtypeExpr execution
От | Ashutosh Bapat |
---|---|
Тема | Re: Optimizing nested ConvertRowtypeExpr execution |
Дата | |
Msg-id | CAFjFpRdqqYguq7j1sbd+U693KMF5UkxHZuEcAfhtZ6Eq-QyqXg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Optimizing nested ConvertRowtypeExpr execution (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>) |
Ответы |
Re: Optimizing nested ConvertRowtypeExpr execution
|
Список | pgsql-hackers |
On Mon, Apr 9, 2018 at 5:34 PM, Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp> wrote: > > The new code doesn't seem to work as written. > >> arg = eval_const_expressions_mutator((Node *) cre->arg, >> context); >> >> /* >> * In case of a nested ConvertRowtypeExpr, we can convert the >> * leaf row directly to the topmost row format without any >> * intermediate conversions. >> */ >> while (arg != NULL && IsA(arg, ConvertRowtypeExpr)) >> arg = (Node *) castNode(ConvertRowtypeExpr, arg)->arg; > > This runs depth-first so the while loop seems to run at most > once. I suppose that the "arg =" and the while loop are > transposed as intention. Yes. I have modelled it after RelableType case few lines above in the same function. -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company
В списке pgsql-hackers по дате отправления: