Re: Design: Escort info from WHERE clause to executor?

Поиск
Список
Период
Сортировка
От peter.trautmeier@gmx.de
Тема Re: Design: Escort info from WHERE clause to executor?
Дата
Msg-id 20070725123423.125800@gmx.net
обсуждение исходный текст
Ответ на Re: Design: Escort info from WHERE clause to executor?  (imad <immaad@gmail.com>)
Список pgsql-hackers
Thanks imad,

Von: imad <immaad@gmail.com>
> It looks like you need a customized version of AExpr Node.
> In the backend parser, an AExpr Node is constructed against each given
> WHERE expression. You can store the weight along with the expression.
> Further, don't forget to upgrade the copy functions and equal
> functions for AExpr if you want to take this weight value all the way
> upto the executor.

I have already done that, alas, it doesn't suffice: During parse analysis transformExpr() turns the AExpr into other
types,e.g. an OpExpr in case of foo = 42.
 

These newly created OpExprs won't last until they reach the executor in every case, though: They are sometimes
recreatedanew during planning 'manually', i.e. not by using the standard copy functions but by creating a new OpExpr
nodeand copying the fields on an as-seen-before basis - these are the places where my weight gets lost.
 

To be honest, I consider not using a special copy function a minor design flaw :) *sigh*

Anyway, thanks again. But giving a weight to AExpr is just the tip of the iceberg when it comes to my final goal - let
myweights enter the executor ;)
 

Regards,
Peter


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

Предыдущее
От: peter.trautmeier@gmx.de
Дата:
Сообщение: Re: EXEC_EVALDEBUG debugging broken?
Следующее
От: peter.trautmeier@gmx.de
Дата:
Сообщение: Re: Design: Escort info from WHERE clause to executor?