Re: Don't allocate IndexAmRoutine dynamically?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Don't allocate IndexAmRoutine dynamically?
Дата
Msg-id 15589.1561497912@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Don't allocate IndexAmRoutine dynamically?  (Andres Freund <andres@anarazel.de>)
Ответы Re: Don't allocate IndexAmRoutine dynamically?  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2019-06-25 16:15:17 -0400, Tom Lane wrote:
>> One too many "consts" there.  Pointer to const object seems fine.
>> The other part is either meaningless or will cause problems.

> Yea - I was thinking of the pointer in RelationData, where having it as
> const *Routine const; would make sense (but it's annoying to do without
> invoking technically undefined behaviour, doing ugly things with memcpy
> or duplicating struct definitions).

Yeah, I think trying to make such pointer fields "const", within
structures that are otherwise not const, is just more trouble than it's
worth.  To start with, how will you assign the handler's output pointer
to such a field?

            regards, tom lane



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Don't allocate IndexAmRoutine dynamically?
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Don't allocate IndexAmRoutine dynamically?