Thomas Swan <tswan-lst@ics.olemiss.edu> writes:
> Actually if it were possible to look at the values before expanding. You
> could reorder the expression so that it was always the case that B < C,
> then your cost would only be one comparison plus the sequential scan.
Uh ... what if B and C are not constants?
regards, tom lane