Re: [HACKERS] Suggestions for implementing IS DISTINCT FROM?

2002-06-25 Thread Thomas Lockhart
... > Adding a new expression node tree type is not too difficult these days; > see for example Joe Conway's recent NullTest and BooleanTest additions. > I believe the existing expansions of row comparison operators > (makeRowExpr) should be replaced by specialized nodes, too. That would > give u

Re: [HACKERS] Suggestions for implementing IS DISTINCT FROM?

2002-06-24 Thread Tom Lane
"Christopher Kings-Lynne" <[EMAIL PROTECTED]> writes: > Should I use a boolean in the node to indicate whether it is SYMMETRIC or > ASYMMETRIC, or should I use some sort of integer to indicate whether it is > SYMMETRIC, ASYMMETRIC or DEFAULT (ASYMMETRIC). That way the reverse in > rules and views

Re: [HACKERS] Suggestions for implementing IS DISTINCT FROM?

2002-06-24 Thread Christopher Kings-Lynne
> Please, please, do not do that. Make a new expression node tree type, > instead. We've made this mistake before (eg for BETWEEN) and I don't > want to do it again. I've actually already done almost all the work for converting BETWEEN to a node but I have a couple of questions: Should I use a

Re: [HACKERS] Suggestions for implementing IS DISTINCT FROM?

2002-06-24 Thread Thomas Lockhart
> > I'm looking at implementing IS DISTINCT FROM, among other things. > > ... > > I was thinking to implement this by simply expanding these rules within > > gram.y to be a tree of comparison tests. > Please, please, do not do that. Make a new expression node tree type, > instead. We've made thi

Re: [HACKERS] Suggestions for implementing IS DISTINCT FROM?

2002-06-24 Thread Thomas Lockhart
> I've actually already done almost all the work for converting BETWEEN to a > node but I have a couple of questions: > Should I use a boolean in the node to indicate whether it is SYMMETRIC or > ASYMMETRIC, or should I use some sort of integer to indicate whether it is > SYMMETRIC, ASYMMETRIC or

Re: [HACKERS] Suggestions for implementing IS DISTINCT FROM?

2002-06-23 Thread Tom Lane
Thomas Lockhart <[EMAIL PROTECTED]> writes: > I'm looking at implementing IS DISTINCT FROM, among other things. > ... > I was thinking to implement this by simply expanding these rules within > gram.y to be a tree of comparison tests. Please, please, do not do that. Make a new expression node tr

[HACKERS] Suggestions for implementing IS DISTINCT FROM?

2002-06-22 Thread Thomas Lockhart
I'm looking at implementing IS DISTINCT FROM, among other things. It has the unusual behavior that it compares elements for a tuple by considering two NULLs to be equal (hence non-distinct) rather than "unknown". So the rules for comparison seem to be: a) if the rows compared have different lengt