casting operand to proper type in BlockIdGetBlockNumber - Mailing list pgsql-hackers

From Zhihong Yu
Subject casting operand to proper type in BlockIdGetBlockNumber
Date
Msg-id CALNJ-vT9r0DSsAOw9OXVJFxLENoVS_68kJ5x0p44atoYH+H4dg@mail.gmail.com
Whole thread Raw
Responses Re: casting operand to proper type in BlockIdGetBlockNumber  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,
In test output, I saw:

src/backend/utils/adt/tid.c:112:16: runtime error: left shift of 65535 by 16 places cannot be represented in type 'int'

I think this was due to the left shift in BlockIdGetBlockNumber not properly casting its operand.

Please see the proposed change in patch.

Thanks
Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Problem with moderation of messages with patched attached.
Next
From: Julien Rouhaud
Date:
Subject: Re: Problem with moderation of messages with patched attached.