• Tom Lane's avatar
    Fix bug with WITH RECURSIVE immediately inside WITH RECURSIVE. 99% of the · 255f66ef
    Tom Lane authored
    code was already okay with this, but the hack that obtained the output
    column types of a recursive union in advance of doing real parse analysis
    of the recursive union forgot to handle the case where there was an inner
    WITH clause available to the non-recursive term.  Best fix seems to be to
    refactor so that we don't need the "throwaway" parse analysis step at all.
    Instead, teach the transformSetOperationStmt code to set up the CTE's output
    column information after it's processed the non-recursive term normally.
    Per report from David Fetter.
    255f66ef
parse_cte.c 26.8 KB