Re: question on bits32 wraparound check - Mailing list pgsql-hackers

From Tom Lane
Subject Re: question on bits32 wraparound check
Date
Msg-id 25024.1238799989@sss.pgh.pa.us
Whole thread Raw
In response to question on bits32 wraparound check  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: question on bits32 wraparound check  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> So there's a minor issue on Takahiro-san fillfactor-on-toast patch,
> which is that it does not hand out the last possible "kind" value.  This
> is a bits32 field, so at least theoretically on some platforms it will
> be wider than 32 while on others it will be exactly 32.

So just disallow kind > 31 (hard wired, with a note cross-referencing
the datatype definition).  Even if that leaves some unused bits on some
particular platform, it's correct and ensures portable behavior.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: question on bits32 wraparound check
Next
From: Tom Lane
Date:
Subject: Re: patch for small omission in psql \? help