OK, I found a real solution: we can fix nodeWorktablescan.c so that the order of initialization doesn't matter, by postponing the steps that need information from the RecursiveUnion node until the first exec call for the worktable node.
Although nodeCtescan is making a similar assumption about initialization order, I think that one ought to be safe. We can always change it later if need be. 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