subselects

Bruce Momjian <maillist@candle.pha.pa.us>

From: Bruce Momjian <maillist@candle.pha.pa.us>
To: hackers@postgreSQL.org (PostgreSQL-development)
Cc: vadim@sable.krasnoyarsk.su (Vadim B. Mikheev)
Date: 1998-01-21T04:21:22Z
Lists: pgsql-hackers
OK, I now have rewrites working with subselects.  At least, I think it
will work.  No way to test it yet.

It basically rewrites all the subqueries first, then the main query.  It
does the lowest queries first.  I do this so if a rewrite adds a
subquery as part of the rewrite, the new subquery does not get
processed.

For each query rewritten, I have code to go into each SubLink and recode
any correlated variables that reference the outer query level I am
rewriting.  Pretty slick.

-- 
Bruce Momjian
maillist@candle.pha.pa.us