[dynahash] do not refill the hashkey after hash_search

Поиск
Список
Период
Сортировка
От Junwang Zhao
Тема [dynahash] do not refill the hashkey after hash_search
Дата
Msg-id CAEG8a3+UPF=R2QGPgJMF2mKh8xPd1H2TmfH77zPuVUFdBpiGUA@mail.gmail.com
обсуждение исходный текст
Ответы Re: [dynahash] do not refill the hashkey after hash_search  (John Naylor <john.naylor@enterprisedb.com>)
Список pgsql-hackers
Hi hackers,

It's not necessary to fill the key field for most cases, since
hash_search has already done that for you. For developer that
using memset to zero the entry structure after enter it, fill the
key field is a must, but IMHO that is not good coding style, we
really should not touch the key field after insert it into the
dynahash.

This patch fixed some most abnormal ones, instead of refilling the
key field of primitive types, adding some assert might be a better
choice.


-- 
Regards
Junwang Zhao

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: pg_upgrade and logical replication
Следующее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: pg_ctl start may return 0 even if the postmaster has been already started on Windows