Repair breakage of rules containing INSERT ... SELECT actions, per bug

Tom Lane <tgl@sss.pgh.pa.us>

Commit: a51f004d29c67823e3a99e9aff141ce9333df0e2
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2000-12-05T19:15:10Z
Releases: 7.1.1
Repair breakage of rules containing INSERT ... SELECT actions, per bug
report from Joel Burton.  Turns out that my simple idea of turning the
SELECT into a subquery does not interact well *at all* with the way the
rule rewriter works.  Really what we need to make INSERT ... SELECT work
cleanly is to decouple targetlists from rangetables: an INSERT ... SELECT
wants to have two levels of targetlist but only one rangetable.  No time
for that for 7.1, however, so I've inserted some ugly hacks to make the
rewriter know explicitly about the structure of INSERT ... SELECT queries.
Ugh :-(

Files