Re: [HACKERS] Another reason to redesign querytree representation

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] Another reason to redesign querytree representation
Дата
Msg-id 199907200451.AAA10828@candle.pha.pa.us
обсуждение исходный текст
Ответ на Another reason to redesign querytree representation  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Another reason to redesign querytree representation
Следующее
От: Thomas Lockhart
Дата:
Сообщение: Re: [HACKERS] Another reason to redesign querytree representation