Re: [HACKERS] Another reason to redesign querytree representation - Mailing list pgsql-hackers

From Thomas Lockhart
Subject Re: [HACKERS] Another reason to redesign querytree representation
Date
Msg-id 379406B8.46AEFB00@alumni.caltech.edu
Whole thread Raw
In response to Another reason to redesign querytree representation  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] Another reason to redesign querytree representation
List pgsql-hackers
> Maybe it is time to swallow hard and redesign the querytree
> representation?  I think we really need a multi-level-plan
> data structure right out of the starting gate... a format
> closer to the plantree structure that the executor uses would
> probably be less trouble all around.

Well, while you do that keep in mind outer joins. We've been
discussing it, and it is pretty clear that rte's cannot hold the join
info, since the same source table can participate in more than one
join. So we might have to carry the info in a special kind of
qualification node, which allows the planner/optimizer to generate
subselects below and above that node, but does not allow it to try the
full range of different combinations of joins across it (since it
appears to me that outer joins have only limited possibilities for
rearrangement of the query).

But perhaps a redesigned querytree could carry the info more
naturally...
                 - Thomas

-- 
Thomas Lockhart                lockhart@alumni.caltech.edu
South Pasadena, California


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Another reason to redesign querytree representation
Next
From: Vadim Mikheev
Date:
Subject: Re: [HACKERS] Lots of things happening