pgsql: Revise nodeMergejoin in light of example provided by Guillaume

Lists: pgsql-committers
From: tgl(at)svr1(dot)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Revise nodeMergejoin in light of example provided by Guillaume
Date: 2005-05-13 21:20:16
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-committers

Log Message:
-----------
Revise nodeMergejoin in light of example provided by Guillaume Smet.
When one side of the join has a NULL, we don't want to uselessly try
to match it against every remaining tuple of the other side. While
at it, rewrite the comparison machinery to avoid multiple evaluations
of the left and right input expressions and to use a btree comparator
where available, instead of double operator calls. Also revise the
state machine to eliminate redundant comparisons and hopefully make it
more readable too.

Modified Files:
--------------
pgsql/src/backend/executor:
nodeMergejoin.c (r1.71 -> r1.72)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/nodeMergejoin.c.diff?r1=1.71&r2=1.72)
pgsql/src/include/executor:
execdebug.h (r1.26 -> r1.27)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/executor/execdebug.h.diff?r1=1.26&r2=1.27)
execdefs.h (r1.17 -> r1.18)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/executor/execdefs.h.diff?r1=1.17&r2=1.18)
pgsql/src/include/nodes:
execnodes.h (r1.131 -> r1.132)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/execnodes.h.diff?r1=1.131&r2=1.132)