Re: Dereferenced pointers checked as NULL in btree_utils_var.c

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Dereferenced pointers checked as NULL in btree_utils_var.c
Дата
Msg-id 54C898A4.2010704@vmware.com
обсуждение исходный текст
Ответ на Re: Dereferenced pointers checked as NULL in btree_utils_var.c  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
On 01/28/2015 02:47 AM, Michael Paquier wrote:
> On Wed, Jan 28, 2015 at 3:15 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> So I'm fine with taking out both this documentation text and the dead
>> null-pointer checks; but let's do that all in one patch not piecemeal.
>> In any case, this is just cosmetic cleanup; there's no actual hazard
>> here.
> Attached is a patch with all those things done.

Thanks, applied.

> I added as well an assertion in gistKeyIsEQ checking if the input
> datums are NULL. I believe that this is still useful for developers,
> feel free to rip it out from the patch if you think otherwise.

I ripped it out because I think was wrong. It assumed that the input 
Datums are pass-by-reference, which is not a given. It looks that's true 
for all the current opclasses, so I wouldn't be surprised if there are 
hidden assumptions on that elsewhere in the code, but it was wrong 
nevertheless.

- Heikki




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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Hot Standby WAL reply uses heavyweight session locks, but doesn't have enough infrastructure set up
Следующее
От: "Erik Rijkers"
Дата:
Сообщение: ya comment typo