On May 31, 2005, at 12:48 AM, Tom Lane wrote:
> Michael Glaesemann <grzm(at)myrealbox(dot)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
> 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.
Thanks for you comments.
grzm myrealbox com
In response to
pgsql-hackers by date
|Next:||From: Alvaro Herrera||Date: 2005-06-01 04:40:07|
|Subject: Re: NOLOGGING option, or ?|
|Previous:||From: Tom Lane||Date: 2005-06-01 02:47:30|
|Subject: Re: NOLOGGING option, or ? |