Re: Second RewriteQuery complains about first RewriteQuery in edge case

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Second RewriteQuery complains about first RewriteQuery in edge case
Дата
Msg-id 359738.1764279614@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Second RewriteQuery complains about first RewriteQuery in edge case  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Ответы Re: Second RewriteQuery complains about first RewriteQuery in edge case
Список pgsql-hackers
Dean Rasheed <dean.a.rasheed@gmail.com> writes:
> Here's an update, doing it that way. It does appear somewhat neater.

Yeah, this looks pretty good.  Two nitpicky suggestions:

* Perhaps using foreach_current_index() would be better than
adding the separate loop variable "i" in RewriteQuery.

* I think it would be wise to add a comment about this in
rewriteRuleAction too, perhaps along the lines of

-       /* OK, it's safe to combine the CTE lists */
+       /*
+        * OK, it's safe to combine the CTE lists.  Beware that RewriteQuery
+        * knows we concatenate the lists in this order.
+        */
        sub_action->cteList = list_concat(sub_action->cteList,
                                          copyObject(parsetree->cteList));

            regards, tom lane



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