From: | Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)2ndquadrant(dot)com> |
Cc: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Defining dedicated macro to grab a relation's persistence |
Date: | 2014-11-11 15:19:53 |
Message-ID: | CAFcNs+rungc9nuh0r+4KWz5UHes8ob-JkhDvXtnv0ngHrpXhBA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Nov 7, 2014 at 11:12 AM, Andres Freund <andres(at)2ndquadrant(dot)com>
wrote:
>
> 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.
>
What you meant is "relation->rd_rel->relpersistence" is more readable than
"RelationGetPersistence(relation)" ??
Regards,
--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog: http://fabriziomello.github.io
>> Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
>> Github: http://github.com/fabriziomello
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2014-11-11 15:37:42 | Re: Defining dedicated macro to grab a relation's persistence |
Previous Message | Tom Lane | 2014-11-11 15:18:55 | 9.4RC1 next week |