postgresql/src/include/nodes
Tom Lane 8d19d0e139 Teach parser to transform "x IS [NOT] DISTINCT FROM NULL" to a NullTest.
Now that we've nailed down the principle that NullTest with !argisrow
is fully equivalent to SQL's IS [NOT] DISTINCT FROM NULL, let's teach
the parser about it.  This produces a slightly more compact parse tree
and is much more amenable to optimization than a DistinctExpr, since
the planner knows a good deal about NullTest and next to nothing about
DistinctExpr.

I'm not sure that there are all that many queries in the wild that could
be improved by this, but at least one source of such cases is the patch
just made to postgres_fdw to emit IS [NOT] DISTINCT FROM NULL when
IS [NOT] NULL isn't semantically correct.

No back-patch, since to the extent that this does affect planning results,
it might be considered undesirable plan destabilization.
2016-07-28 17:23:13 -04:00
..
bitmapset.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
execnodes.h Rethink node-level representation of partial-aggregation modes. 2016-06-26 14:33:38 -04:00
extensible.h pgindent run for 9.6 2016-06-09 18:02:36 -04:00
lockoptions.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
makefuncs.h Fix CREATE MATVIEW/CREATE TABLE AS ... WITH NO DATA to not plan the query. 2016-06-27 15:57:50 -04:00
memnodes.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
nodeFuncs.h Refactor to reduce code duplication for function property checking. 2016-06-10 16:03:46 -04:00
nodes.h Rethink node-level representation of partial-aggregation modes. 2016-06-26 14:33:38 -04:00
params.h pgindent run for 9.6 2016-06-09 18:02:36 -04:00
parsenodes.h Teach parser to transform "x IS [NOT] DISTINCT FROM NULL" to a NullTest. 2016-07-28 17:23:13 -04:00
pg_list.h Directly modify foreign tables. 2016-03-18 13:55:52 -04:00
plannodes.h Avoid invalidating all foreign-join cached plans when user mappings change. 2016-07-15 17:23:02 -04:00
primnodes.h Fix assorted fallout from IS [NOT] NULL patch. 2016-07-28 16:09:15 -04:00
print.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
readfuncs.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
relation.h Avoid invalidating all foreign-join cached plans when user mappings change. 2016-07-15 17:23:02 -04:00
replnodes.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
tidbitmap.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
value.h Update copyright for 2016 2016-01-02 13:33:40 -05:00