| От | Bruce Momjian |
|---|---|
| Тема | Re: [HACKERS] PostGreSQL v6.2.1 for Linux Alpha |
| Дата | |
| Msg-id | 199802121652.LAA27218@candle.pha.pa.us обсуждение исходный текст |
| Ответ на | Re: [HACKERS] PostGreSQL v6.2.1 for Linux Alpha ("Kenji T. Hollis" <khollis@Gawain.Houston-InterWeb.COM>) |
| Список | pgsql-hackers |
> > Bruce: > > > OK, I have a new idea. See in utils/hash/hashfn.c:tag_hash, there is > > the line: > > > > for (; keysize > (sizeof(int) - 1); keysize -= sizeof(int),key++) > > h = h * PRIME1 ^ (*key); > > > > Now, since h is a long, shouldn't the for loop be comparing > > sizeof(long)? However, key is an int*. > > How is this a problem? *key is getting the value of the current pointer > of key. This means, if key contains a string: "Ooga" and key++, then the > value of *key would be "o" in decimal. This is a standard hashing > routine, and the problem does not lie here as far as I can see. You are right. -- Bruce Momjian maillist@candle.pha.pa.us
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера