Re: B-Tree support function number 3 (strxfrm() optimization)

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, Marti Raudsepp <marti(at)juffo(dot)org>, Stephen Frost <sfrost(at)snowman(dot)net>, Greg Stark <stark(at)mit(dot)edu>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: B-Tree support function number 3 (strxfrm() optimization)
Date: 2015-01-23 07:18:16
Message-ID: CAApHDvr9rJmfi-zYbfe0hPt2ArppDB85u-6N-2Hn4j8oOaCypQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 20 January 2015 at 17:10, Peter Geoghegan <pg(at)heroku(dot)com> wrote:

> On Mon, Jan 19, 2015 at 7:47 PM, Michael Paquier
> <michael(dot)paquier(at)gmail(dot)com> wrote:
>
> > With your patch applied, the failure with MSVC disappeared, but there
> > is still a warning showing up:
> > (ClCompile target) ->
> > src\backend\lib\hyperloglog.c(73): warning C4334: '<<' : result of
> > 32-bit shift implicitly converted to 64 bits (was 64-bit shift
> > intended?
>
> That seems harmless. I suggest an explicit cast to "Size" here.
>

This caught my eye too.

I agree about casting to Size.

Patch attached.

Regards

David Rowley

Attachment Content-Type Size
hyperloglog_bitshift_fix.patch application/octet-stream 497 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2015-01-23 07:18:30 Re: jsonb, unicode escapes and escaped backslashes
Previous Message Amit Kapila 2015-01-23 03:42:45 Re: Proposal: knowing detail of config files via SQL