From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | khollis(at)Gawain(dot)Houston-InterWeb(dot)COM (Kenji T(dot) Hollis) |
Cc: | hackers(at)postgresql(dot)org |
Subject: | Re: [HACKERS] PostGreSQL v6.2.1 for Linux Alpha |
Date: | 1998-02-12 16:51:21 |
Message-ID: | 199802121652.LAA27218@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)candle(dot)pha(dot)pa(dot)us
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1998-02-12 16:53:13 | Re: [HACKERS] PostGreSQL v6.2.1 for Linux Alpha |
Previous Message | Bruce Momjian | 1998-02-12 16:50:51 | Re: [HACKERS] PostGreSQL v6.2.1 for Linux Alpha |