aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/ruleutils.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-07-28 17:23:03 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-07-28 17:23:13 -0400
commit8d19d0e139238cdcb3f1f7e1adc4ff959562822f (patch)
treed51df5d0d77f553524ce628cc51555ed9e76bb98 /src/backend/utils/adt/ruleutils.c
parentef5d4a3cfacb009526aac3e01a26f4b54d70bfd7 (diff)
downloadpostgresql-8d19d0e139238cdcb3f1f7e1adc4ff959562822f.tar.gz
postgresql-8d19d0e139238cdcb3f1f7e1adc4ff959562822f.zip
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.
Diffstat (limited to 'src/backend/utils/adt/ruleutils.c')
0 files changed, 0 insertions, 0 deletions