Re: Misleading comment in tuplesort_set_bound

2019-09-12 Thread Tom Lane
Alvaro Herrera writes: > [ shrug ] It seemed to require no further work, so I just pushed Tom's > proposed change. > I added an empty line after the new combined assertion, which makes > clearer (to me anyway) that the other assertions are unrelated. Actually, the thing I wanted to add was some

Re: Misleading comment in tuplesort_set_bound

2019-09-12 Thread Alvaro Herrera
On 2019-Sep-05, James Coleman wrote: > Yes, planning on it, just a bit behind right now so will likely be a > few more days at least. [ shrug ] It seemed to require no further work, so I just pushed Tom's proposed change. I added an empty line after the new combined assertion, which makes clear

Re: Misleading comment in tuplesort_set_bound

2019-09-05 Thread James Coleman
Yes, planning on it, just a bit behind right now so will likely be a few more days at least. On Thu, Sep 5, 2019 at 4:57 PM Alvaro Herrera from 2ndQuadrant wrote: > > On 2019-Aug-26, Tom Lane wrote: > > > James Coleman writes: > > > I think the comment is fine as-is. Perhaps the code would be c

Re: Misleading comment in tuplesort_set_bound

2019-09-05 Thread Alvaro Herrera from 2ndQuadrant
On 2019-Aug-26, Tom Lane wrote: > James Coleman writes: > I think the comment is fine as-is. Perhaps the code would be clearer > though, if we merged those two asserts into one? > > /* Assert we're called before loading any tuples */ > Assert(state->status == TSS_INITIAL && >

Re: Misleading comment in tuplesort_set_bound

2019-08-26 Thread Tom Lane
James Coleman writes: > While digging into the incremental sort patch, I noticed in > tuplesort.c at the beginning of the function in $SUBJECT we have this > comment and assertion: > tuplesort_set_bound(Tuplesortstate *state, int64 bound) > { > /* Assert we're called before loading any tuples

Misleading comment in tuplesort_set_bound

2019-06-23 Thread James Coleman
While digging into the incremental sort patch, I noticed in tuplesort.c at the beginning of the function in $SUBJECT we have this comment and assertion: tuplesort_set_bound(Tuplesortstate *state, int64 bound) { /* Assert we're called before loading any tuples */ Assert(state->status == TSS