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 tree type,
instead.  We've made this mistake before (eg for BETWEEN) and I don't
want to do it again.

Aside from the points you make, a direct expansion approach cannot
reverse-list properly in rules/views, and it will force multiple
evaluations of arguments that should not be multiply evaluated.

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 us a shot at implementing row '<', '>' comparisons in a
spec-compliant fashion...

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to