Re: Misleading comment in tuplesort_set_bound

Поиск
Список
Период
Сортировка
Искать
От
Alvaro Herrera from 2ndQuadrant
Тема
Re: Misleading comment in tuplesort_set_bound
Дата
Msg-id
20190905205657.GA27458@alvherre.pgsql
Ответ на
Список
Дерево обсуждения
Misleading comment in tuplesort_set_bound James Coleman <jtc331@gmail.com>
Re: Misleading comment in tuplesort_set_bound Tom Lane <tgl@sss.pgh.pa.us>
Re: Misleading comment in tuplesort_set_bound Alvaro Herrera from 2ndQuadrant <alvherre@alvh.no-ip.org>
Re: Misleading comment in tuplesort_set_bound James Coleman <jtc331@gmail.com>
Re: Misleading comment in tuplesort_set_bound Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Misleading comment in tuplesort_set_bound Tom Lane <tgl@sss.pgh.pa.us>
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 &&
> 	       state->memtupcount == 0);

Makes sense to me.  James, do you want to submit a new patch?

> I'm not totally sure about the usefulness/relevance of the two
> assertions following these, but they could likely do with their
> own comment(s), because this one surely isn't covering them.


-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: James Coleman
Дата:
FAQ