Re: pgsql: Fix list_copy_head() with empty Lists

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: Fix list_copy_head() with empty Lists
Дата
Msg-id 3129478.1681997309@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pgsql: Fix list_copy_head() with empty Lists  (David Rowley <drowley@postgresql.org>)
Ответы Re: pgsql: Fix list_copy_head() with empty Lists  (David Rowley <dgrowleyml@gmail.com>)
Список pgsql-committers
David Rowley <drowley@postgresql.org> writes:
> Fix list_copy_head() with empty Lists

> list_copy_head() given an empty List would crash from trying to
> dereference the List to obtain its length.  Since NIL is how we represent
> an empty List, we should just be returning another empty List in this
> case.

I see that list_copy_head exists in v15 as well.  It appears to have
no callers there, but we'd better fix it anyway in case somebody
back-patches a fix that uses it.

Or, maybe, remove it in 15?

            regards, tom lane



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

Предыдущее
От: David Rowley
Дата:
Сообщение: pgsql: Doc: clarify NULLS NOT DISTINCT use in unique indexes
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: pgsql: Fix autovacuum cost debug logging