Re: [HACKERS] Design: Escort info from WHERE clause to executor?

2007-07-25 Thread Heikki Linnakangas
[EMAIL PROTECTED] wrote: To sum up, I am looking for a (decently efficient) scheme that is able to (1) pass arbitrary conditional expressions from WHERE to the executor in a structure preserving way. (2) annotate arbitrary expressions with weights that survive on its way from the parser

Re: [HACKERS] Design: Escort info from WHERE clause to executor?

2007-07-25 Thread peter . trautmeier
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

Re: [HACKERS] Design: Escort info from WHERE clause to executor?

2007-07-25 Thread peter . trautmeier
Von: Heikki Linnakangas [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: To sum up, I am looking for a (decently efficient) scheme that is able to (1) pass arbitrary conditional expressions from WHERE to the executor in a structure preserving way. (2) annotate arbitrary expressions with

Re: [HACKERS] Design: Escort info from WHERE clause to executor?

2007-07-25 Thread Heikki Linnakangas
[EMAIL PROTECTED] wrote: Von: Heikki Linnakangas [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: To sum up, I am looking for a (decently efficient) scheme that is able to (1) pass arbitrary conditional expressions from WHERE to the executor in a structure preserving way. (2) annotate arbitrary

Re: [HACKERS] Design: Escort info from WHERE clause to executor?

2007-07-25 Thread Dawid Kuroczko
On 7/25/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Why? What are you trying to achieve? I am implementing a technique that sorts a result set according to weight annotations in the WHERE. The query SELECT * FROM cars WHERE (cdChanger=1){2} OR (mp3player=1){1} would be sorted

Re: [HACKERS] Design: Escort info from WHERE clause to executor?

2007-07-25 Thread Gregory Stark
[EMAIL PROTECTED] writes: Why? What are you trying to achieve? I am implementing a technique that sorts a result set according to weight annotations in the WHERE. The query SELECT * FROM cars WHERE (cdChanger=1){2} OR (mp3player=1){1} would be sorted according to partial

Re: [HACKERS] Design: Escort info from WHERE clause to executor?

2007-07-25 Thread Jonah H. Harris
On 7/25/07, Gregory Stark [EMAIL PROTECTED] wrote: You're trying to do it by annotating the clauses early on in the parse stage, and then looking at the annotations in the executor. But I think you'll find that there are too many steps in between those two which risk destroying or making it

Re: [HACKERS] Design: Escort info from WHERE clause to executor?

2007-07-25 Thread Tom Lane
Heikki Linnakangas [EMAIL PROTECTED] writes: I am implementing a technique that sorts a result set according to weight annotations in the WHERE. The query SELECT * FROM cars WHERE (cdChanger=1){2} OR (mp3player=1){1} would be sorted according to partial conditions that hold. You

Re: [HACKERS] Design: Escort info from WHERE clause to executor?

2007-07-25 Thread peter . trautmeier
Thanks Heikki, Von: Heikki Linnakangas [EMAIL PROTECTED] I am implementing a technique that sorts a result set according to weight annotations in the WHERE. The query SELECT * FROM cars WHERE (cdChanger=1){2} OR (mp3player=1){1} would be sorted according to partial

[HACKERS] Design: Escort info from WHERE clause to executor?

2007-07-24 Thread peter . trautmeier
Hi all, I want to pass additional weight info from the WHERE clause to the executor and I hope someone can help me with this. I accept clauses like the following WHERE (foo='a'){1} WHERE (foo='a'){1} OR (bar='b'){2} WHERE ((foo='a'){1} OR (bar='b'){2})){42} OR (baz='c'){3} where the {} takes

Re: [HACKERS] Design: Escort info from WHERE clause to executor?

2007-07-24 Thread imad
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