Possible NULL dereferencing (src/backend/tcop/pquery.c)

Поиск
Список
Период
Сортировка
От Ranier Vilela
Тема Possible NULL dereferencing (src/backend/tcop/pquery.c)
Дата
Msg-id CAEudQAppKDbMi=mijz9ayFpj4x0VQg9ZcHVK2F90VKM7ozqyfA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Possible NULL dereferencing (src/backend/tcop/pquery.c)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

Per Coverity.
Perhaps it is excessive caution.
Probably assertion check has already caught all possible errors.
But, redundancy may not cost as much and is worth it.

1.Assertion check
/* Caller messed up if we have neither a ready query nor held data. */
Assert(queryDesc || portal->holdStore);

But in release, if QueryDesc is NULL and portal->holdStore is NULL too,
when Call PushActiveSnapshot  deference NULL check can happen.

2. if (portal->atEnd || count <= 0) is True
No need to recheck count against FETCH_ALL.

Is it worth correcting them?

regards,
Ranier Vilela
Вложения

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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: pg_dump bug for extension owned tables
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: Default setting for enable_hashagg_disk