aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gist.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2010-11-12 15:14:51 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2010-11-12 15:18:27 -0500
commit5c85d1122b935a30f7cfb6a09ba282322b3b6bee (patch)
tree4ffa1269072f608545fa05e959f02b1e90089b65 /src/backend/access/gist/gist.c
parentd434e8f6ad2580a9137cc91d27af54e73079a471 (diff)
downloadpostgresql-5c85d1122b935a30f7cfb6a09ba282322b3b6bee.tar.gz
postgresql-5c85d1122b935a30f7cfb6a09ba282322b3b6bee.zip
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.
Diffstat (limited to 'src/backend/access/gist/gist.c')
0 files changed, 0 insertions, 0 deletions