postgresql/src/backend/optimizer/util
Tom Lane d7304244e2 Fix old oversight in const-simplification of COALESCE() expressions.
Once we have found a non-null constant argument, there is no need to
examine additional arguments of the COALESCE.  The previous coding got it
right only if the constant was in the first argument position; otherwise
it tried to simplify following arguments too, leading to unexpected
behavior like this:

regression=# select coalesce(f1, 42, 1/0) from int4_tbl;
ERROR:  division by zero

It's a minor corner case, but a bug is a bug, so back-patch all the way.
2010-11-12 15:17:30 -05:00
..
clauses.c Fix old oversight in const-simplification of COALESCE() expressions. 2010-11-12 15:17:30 -05:00
joininfo.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
Makefile Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
pathnode.c Provide hashing support for arrays. 2010-10-30 21:56:11 -04:00
placeholder.c Fix PlaceHolderVar mechanism's interaction with outer joins. 2010-09-28 14:19:00 -04:00
plancat.c Teach CLUSTER to use seqscan-and-sort when it's faster than indexscan. 2010-10-07 20:00:28 -04:00
predtest.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
relnode.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
restrictinfo.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
tlist.c Provide hashing support for arrays. 2010-10-30 21:56:11 -04:00
var.c Reimplement planner's handling of MIN/MAX aggregate optimization. 2010-11-04 12:01:17 -04:00