Re: pgsql: Test pg_atomic_fetch_add_ with variable addend and 16-bitedge c

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: pgsql: Test pg_atomic_fetch_add_ with variable addend and 16-bitedge c
Дата
Msg-id 20190915160021.GA24376@alvherre.pgsql
обсуждение исходный текст
Ответ на pgsql: Test pg_atomic_fetch_add_ with variable addend and 16-bit edgec  (Noah Misch <noah@leadboat.com>)
Ответы Re: pgsql: Test pg_atomic_fetch_add_ with variable addend and 16-bitedge c
Список pgsql-committers
On 2019-Sep-14, Noah Misch wrote:

> Test pg_atomic_fetch_add_ with variable addend and 16-bit edge cases.

I don't understand this.

    if (pg_atomic_fetch_add_u32(&var, INT_MAX) != INT_MAX)
        elog(ERROR, "pg_atomic_add_fetch_u32() #3 wrong");

    pg_atomic_fetch_add_u32(&var, 2);   /* wrap to 0 */

    if (pg_atomic_fetch_add_u32(&var, PG_INT16_MAX) != 0)
        elog(ERROR, "pg_atomic_fetch_add_u32() #3 wrong");

The existing one seems to be naming the wrong function in the error
message, and if you fix that then you have two "#3 wrong" cases.
Isn't this confusing?  Am I just too sensitive?  Is this pointless to
fix?

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



В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix bogus sizeof calculations.
Следующее
От: Noah Misch
Дата:
Сообщение: Re: pgsql: Test pg_atomic_fetch_add_ with variable addend and 16-bitedge c