On May 31, 2005, at 12:48 AM, Tom Lane wrote:
> Michael Glaesemann <grzm@myrealbox.com> writes:
>
>
>
>> tm_mday is an int value, which is only guaranteed to be 2
>> bytes (though it may be larger), if I understand correctly.
>>
>>
>>
>
> Actually, practically all of the Postgres code assumes int is at least
> 32 bits. Feel free to change pg_tm's field to be declared int32
> instead
> of just int if that bothers you, but it is really quite academic.
>
>
Thanks for the clarification. My instinct would be to change so that
it's no longer just an assumption. Is there any benefit to changing
the other pg_tm int fields to int32? I imagine int is used quite a
bit throughout the code, and I'd think assuming 32-bit ints would
have bitten people in the past if it were invalid, so perhaps
changing them is unnecessary.
> I'd make the on-disk field an int32, taking the struct to 16 bytes.
>
>
Will do.
Thanks for you comments.
Michael Glaesemann
grzm myrealbox com