Re: Defining dedicated macro to grab a relation's persistence

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Defining dedicated macro to grab a relation's persistence
Дата
Msg-id 20141107131249.GA4510@alap3.anarazel.de
обсуждение исходный текст
Ответ на Defining dedicated macro to grab a relation's persistence  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: Defining dedicated macro to grab a relation's persistence  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
Список pgsql-hackers
Hi,

On 2014-11-07 22:08:33 +0900, Michael Paquier wrote:
> After looking at a patch of this commit fest using
> rd_rel->relpersistence, I got a look at how many times this expression
> was being used directly in the backend code and wondered if it would
> not be useful to add a dedicated macro in rel.h to get the persistence
> of a relation like in the patch attached. (Note: it is actually used
> 39 times).

I personally find the direct access actually more readable, so I'm not a
fan of further extending the scheme. Consistency with some other common
accessors is an argument though.

Greetings,

Andres Freund

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



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Defining dedicated macro to grab a relation's persistence
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [BUGS] ltree::text not immutable?