Re: [HACKERS] Another reason to redesign querytree representation

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Another reason to redesign querytree representation
Date: 1999-07-20 04:51:22
Message-ID: 199907200451.AAA10828@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> As far as I can see, there is no way to represent doing the Right
> Thing with the current querytree representation. Either the
> targetlist expression includes a coercion to int4 or it doesn't;
> we can't represent "do the DISTINCT sort and filter on float8,
> *then* coerce to int4" in a single-level targetlist.
>
> Meanwhile, Jan has been muttering that he can't really do rules
> right without an RTE entry for the result of a sub-select. And
> the more I look at the UNION/EXCEPT/INTERSECT code, the less I
> like it.
>
> 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.

The current system was designed by me. It was very little code, and I
was quite suprised it worked as well as it does. Feel free to redesign
it. I did it to be small and nimble. Seems it is not flexible enough.

Got to admit, it is a nice trick to get UNIONS, which is all it was
really designed to do. At the time, it was neat to get any feature out
of so little code. Ah, the buggy pre-6.5 days.

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 1999-07-20 05:10:59 Re: [PORTS] RedHat6.0 & Alpha
Previous Message Tom Lane 1999-07-20 04:21:43 Another reason to redesign querytree representation