Re: [HACKERS] Are range_before and range_after commutator operators?

2011-11-18 Thread Jeff Davis
On Thu, 2011-11-17 at 17:10 -0500, Tom Lane wrote: Applied, thanks. These comments aren't quite what I'd hoped for though. What I'm lacking is the conceptual context, ie, why is a less-equal-greater primitive for bounds a good thing? It seems like when you consider the four possible

Re: [HACKERS] Are range_before and range_after commutator operators?

2011-11-17 Thread Jeff Davis
On Wed, 2011-11-16 at 17:53 -0500, Tom Lane wrote: I noticed that and are not marked as commutator operators, though a naive view of their semantics suggests they should be. However, I realized that there might be edge cases I wasn't thinking about, so I went looking in the patch to try to

Re: [HACKERS] Are range_before and range_after commutator operators?

2011-11-17 Thread Tom Lane
Jeff Davis pg...@j-davis.com writes: Yikes! While commenting the code, it turns out that I missed the case where the values match and they are both exclusive; but one is upper and the other lower. Worse than that, there were apparently some bogus test results that expected the wrong output.

[HACKERS] Are range_before and range_after commutator operators?

2011-11-16 Thread Tom Lane
I noticed that and are not marked as commutator operators, though a naive view of their semantics suggests they should be. However, I realized that there might be edge cases I wasn't thinking about, so I went looking in the patch to try to confirm this. And I found neither a single line of