Thanks imad, Von: imad <[EMAIL PROTECTED]> > 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 recreated anew during planning 'manually', i.e. not by using the standard copy functions but by creating a new OpExpr node and 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 my weights enter the executor ;) Regards, Peter ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster