Hitoshi Harada <umi.tan...@gmail.com> writes: > 2010/9/15 Marko Tiikkaja <marko.tiikk...@cs.helsinki.fi>: >> In the email you referred to, Tom was concerned about the case where these >> WITH lists have different RECURSIVE declarations. This patch makes both >> RECURSIVE if either of them is. I can think of cases where that might lead >> to surprising behaviour, but the chances of any of those happening in real >> life seem pretty slim.
> Does that cause surprising behavior? My recollection is that whether a CTE is marked RECURSIVE or not affects its scope of visibility, so that confusing the two cases can result in flat-out incorrect parser behavior. It would probably be all right to combine the cases internally, at the rewriter or planner stage. It's not okay to do it in the parser, not even after doing parse analysis of the individual CTEs, because then it would be impossible for ruleutils.c to reverse-list the query correctly. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers