Re: Small improvements to pg_list.h's linitial(), lsecond(), lthird() etc macros

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Small improvements to pg_list.h's linitial(), lsecond(), lthird() etc macros
Дата
Msg-id 171412.1601251135@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Small improvements to pg_list.h's linitial(), lsecond(), lthird() etc macros  (David Rowley <dgrowleyml@gmail.com>)
Ответы Re: Small improvements to pg_list.h's linitial(), lsecond(), lthird() etc macros
Список pgsql-hackers
David Rowley <dgrowleyml@gmail.com> writes:
> I'm a bit unsure about llast()'s new double evaluation of the list.
> Perhaps I can add a new inline function named list_last_cell() to get
> around that... Or maybe it doesn't matter. I'm not quite sure what's
> best there.

Double evaluation bad, especially in a macro that has not had such a
hazard for the last twenty-plus years.

It might not be worth mucking with llast, as it's not used very heavily
I believe.  But if it is, then let's add another inline function.

            regards, tom lane



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

Предыдущее
От: Greg Nancarrow
Дата:
Сообщение: Re: Parallel INSERT (INTO ... SELECT ...)
Следующее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: "cert" + clientcert=verify-ca in pg_hba.conf?