"Qingqing Zhou" <[EMAIL PROTECTED]> writes:
> "Tom Lane" <[EMAIL PROTECTED]> wrote in message 
> There is a possible sequence like this:

> ALIGNOF_LONG        4
> ALIGNOF_DOUBLE      8
> MAXIMUM_ALIGNOF     8

> vs.

> ALIGNOF_LONG        8
> ALIGNOF_DOUBLE      8
> MAXIMUM_ALIGNOF     8

> So we should at least check ALIGNOF_LONG as well.

No, we don't need to, because we do not really care about ALIGNOF_LONG
per se.  We don't use "long" as an on-disk datatype, precisely because
we don't know what size it is.  We use int32 and int64.  The former has
align 4 on all machines AFAIK, and the latter has MAXIMUM_ALIGNOF.

> There are some machines with sizeof(int) equals to 64, if my memory saves, 
> which might imply that ALIGNOF_INT equals to 8.

If there were such a machine, Postgres wouldn't run on it anyway, and
a lot of other software too.  There'd be no way to have both int16 and
int32 types ("short" could cover only one of them).

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to