Re: Design: Escort info from WHERE clause to executor? - Mailing list pgsql-hackers

From peter.trautmeier@gmx.de
Subject Re: Design: Escort info from WHERE clause to executor?
Date
Msg-id 20070725123423.125800@gmx.net
Whole thread Raw
In response to Re: Design: Escort info from WHERE clause to executor?  (imad <immaad@gmail.com>)
List 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 by date:

Previous
From: peter.trautmeier@gmx.de
Date:
Subject: Re: EXEC_EVALDEBUG debugging broken?
Next
From: peter.trautmeier@gmx.de
Date:
Subject: Re: Design: Escort info from WHERE clause to executor?