Re: question on bits32 wraparound check

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: question on bits32 wraparound check
Date: 2009-04-03 23:06:29
Message-ID: 25024.1238799989@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-04-03 23:38:39 Re: patch for small omission in psql \? help
Previous Message Alvaro Herrera 2009-04-03 22:45:39 question on bits32 wraparound check