forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6f19a8c
committed
Teach eval_const_expressions to constant-fold LEAST/GREATEST expressions.
Doing this requires an assumption that the invoked btree comparisonfunction is immutable. We could check that explicitly, but in otherplaces such as contain_mutable_functions we just assume that it's true,so we may as well do likewise here. (If the comparison function'sbehavior isn't immutable, the sort order in indexes built with it wouldbe unstable, so it seems certainly wrong for it not to be so.)Vik FearingDiscussion:https://postgr.es/m/c6e8504c-4c43-35fa-6c8f-3c0b80a912cc@2ndquadrant.com1 parente0ef136 commit6f19a8c
1 file changed
+6
-1
lines changedLines changed: 6 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3378 | 3378 |
| |
3379 | 3379 |
| |
3380 | 3380 |
| |
| 3381 | + | |
3381 | 3382 |
| |
3382 | 3383 |
| |
3383 | 3384 |
| |
3384 | 3385 |
| |
3385 | 3386 |
| |
| 3387 | + | |
| 3388 | + | |
| 3389 | + | |
| 3390 | + | |
3386 | 3391 |
| |
3387 | 3392 |
| |
3388 | 3393 |
| |
| |||
3783 | 3788 |
| |
3784 | 3789 |
| |
3785 | 3790 |
| |
3786 |
| - | |
| 3791 | + | |
3787 | 3792 |
| |
3788 | 3793 |
| |
3789 | 3794 |
| |
|
0 commit comments
Comments
(0)