Re: Defining dedicated macro to grab a relation's persistence - Mailing list pgsql-hackers

From Fabrízio de Royes Mello
Subject Re: Defining dedicated macro to grab a relation's persistence
Date
Msg-id CAFcNs+rungc9nuh0r+4KWz5UHes8ob-JkhDvXtnv0ngHrpXhBA@mail.gmail.com
Whole thread Raw
In response to Re: Defining dedicated macro to grab a relation's persistence  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: Defining dedicated macro to grab a relation's persistence  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
<div dir="ltr"><div class="gmail_extra">On Fri, Nov 7, 2014 at 11:12 AM, Andres Freund <<a
href="mailto:andres@2ndquadrant.com">andres@2ndquadrant.com</a>>wrote:<br />><br />> Hi,<br />><br />>
On2014-11-07 22:08:33 +0900, Michael Paquier wrote:<br />> > After looking at a patch of this commit fest
using<br/>> > rd_rel->relpersistence, I got a look at how many times this expression<br />> > was being
useddirectly in the backend code and wondered if it would<br />> > not be useful to add a dedicated macro in
rel.hto get the persistence<br />> > of a relation like in the patch attached. (Note: it is actually used<br
/>>> 39 times).<br />><br />> I personally find the direct access actually more readable, so I'm not a<br
/>>fan of further extending the scheme. Consistency with some other common<br />> accessors is an argument
though.<br/>><br /><br /></div><div class="gmail_extra">What you meant is "relation->rd_rel->relpersistence"
ismore readable than "RelationGetPersistence(relation)" ??<br /></div><div class="gmail_extra"><br /></div><div
class="gmail_extra">Regards,<br/><br /></div><div class="gmail_extra">--<br />Fabrízio de Royes Mello<br
/>Consultoria/CoachingPostgreSQL<br />>> Timbira: <a
href="http://www.timbira.com.br">http://www.timbira.com.br</a><br/>>> Blog: <a
href="http://fabriziomello.github.io">http://fabriziomello.github.io</a><br/>>> Linkedin: <a
href="http://br.linkedin.com/in/fabriziomello">http://br.linkedin.com/in/fabriziomello</a><br/>>> Twitter: <a
href="http://twitter.com/fabriziomello">http://twitter.com/fabriziomello</a><br/>>> Github: <a
href="http://github.com/fabriziomello">http://github.com/fabriziomello</a></div></div>

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: 9.4RC1 next week
Next
From: Alvaro Herrera
Date:
Subject: Re: Defining dedicated macro to grab a relation's persistence