Thread: pgsql: Fix corner case wherein a WorkTableScan node could get

pgsql: Fix corner case wherein a WorkTableScan node could get

From
tgl@postgresql.org (Tom Lane)
Date:
Log Message:
-----------
Fix corner case wherein a WorkTableScan node could get initialized before the
RecursiveUnion to which it refers.  It turns out that we can just postpone the
relevant initialization steps until the first exec call for the node, by which
time the ancestor node must surely be initialized.  Per report from Greg Stark.

Modified Files:
--------------
    pgsql/src/backend/executor:
        nodeWorktablescan.c (r1.1 -> r1.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/nodeWorktablescan.c?r1=1.1&r2=1.2)
    pgsql/src/test/regress/expected:
        with.out (r1.4 -> r1.5)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/with.out?r1=1.4&r2=1.5)
    pgsql/src/test/regress/sql:
        with.sql (r1.4 -> r1.5)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/with.sql?r1=1.4&r2=1.5)