Re: Interval->day proposal

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема Re: Interval->day proposal
Дата
Msg-id 8E9DCE32-747D-4CD5-89C3-7197343C00B4@myrealbox.com
обсуждение исходный текст
Ответ на Re: Interval->day proposal  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Interval->day proposal  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: NOLOGGING option, or ?
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: NOLOGGING option, or ?