Re: Something's been bugging me

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Something's been bugging me
Дата
Msg-id 7239.1191195587@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Something's been bugging me  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-hackers
Gregory Stark <stark@enterprisedb.com> writes:
> "Tom Lane" <tgl@sss.pgh.pa.us> writes:
>> Gregory Stark <stark@enterprisedb.com> writes:
>>> Why do you cast arguments to memcmp to char* ?
>> 
>> Well, *I* haven't done it in a long time, 

> I'm referring to tuptoaster.c:488

Oh, I'm sorry, I thought you were talking about my hypothetical memcpy
example.

The casts in the memcmp call were because I was worried about some
compiler trying to optimize the memcmp into a word-wide operation
on the strength of the theory that struct varlena pointers must be
word-aligned.  Given the later discovery about the copying problem,
those casts may be unhelpful as far as gcc is concerned; but I'm still
inclined to leave them there in case they make a difference for some
other compiler.
        regards, tom lane


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

Предыдущее
От: Gregory Stark
Дата:
Сообщение: Re: Something's been bugging me
Следующее
От: "Islam Hegazy"
Дата:
Сообщение: adding operators