Re: unconstify equivalent for volatile

Поиск
Список
Период
Сортировка
От Petr Jelinek
Тема Re: unconstify equivalent for volatile
Дата
Msg-id 03081802-8268-cc86-fab7-e5562d54532d@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: unconstify equivalent for volatile  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: unconstify equivalent for volatile  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 18/02/2019 16:43, Tom Lane wrote:
> Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
>> I propose to add an equivalent to unconstify() for volatile.  When
>> working on this, I picked the name unvolatize() mostly as a joke, but it
>> appears it's a real word.  Other ideas?
> 
> Umm ... wouldn't this amount to papering over actual bugs?  I can
> think of legitimate reasons to cast away const, but casting away
> volatile seems pretty dangerous, and not something to encourage
> by making it notationally easy.
> 

I'd argue that it's not making it easier to do but rather easier to spot
(vs normal type casting) which is IMO a good thing from patch review
perspective.

-- 
  Petr Jelinek                  http://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training & Services


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Missing Column names with multi-insert
Следующее
От: Tom Lane
Дата:
Сообщение: Re: unconstify equivalent for volatile