| From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
|---|---|
| To: | maillist(at)candle(dot)pha(dot)pa(dot)us (Bruce Momjian) |
| Cc: | hackers(at)postgreSQL(dot)org, khollis(at)Gawain(dot)Houston-InterWeb(dot)COM |
| Subject: | Re: [HACKERS] PostGreSQL v6.2.1 for Linux Alpha |
| Date: | 1998-02-12 14:51:52 |
| Message-ID: | 199802121451.JAA24991@candle.pha.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
>
> > Take a look at utils/hash/hashfn.c:tag_hash. Is there a problem in that
> > code for your platform. Is the hash getting set, or is it falling
> > through the case statements? This code is clearly broken for
> > sizeof(int) > 4, but I think your ints are 4, and longs are 8. I bet
> > somewhere we are using a long where we should be using an int, and that
> > is why only your platform is seeing it. Is this true about long vs.
> > int. I can review our use of longs to see if there are problems.
>
> 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*.
>
> Comments?
>
Never mind. I think the code is good, but if someone sees a problem
with longs/ints anywhere in the code, please let's discuss it.
--
Bruce Momjian
maillist(at)candle(dot)pha(dot)pa(dot)us
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thomas G. Lockhart | 1998-02-12 15:02:26 | Re: [HACKERS] PostGreSQL v6.2.1 for Linux Alpha |
| Previous Message | Bruce Momjian | 1998-02-12 14:47:43 | Re: [HACKERS] Problem with the numbers I reported yesterday |