Re: Declarative partitioning vs. sql_inheritance

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Dmitry Ivanov <d(dot)ivanov(at)postgrespro(dot)ru>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Erik Rijkers <er(at)xs4all(dot)nl>, Amit Langote <amitlangote09(at)gmail(dot)com>, Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, pgsql-hackers-owner(at)postgresql(dot)org
Subject: Re: Declarative partitioning vs. sql_inheritance
Date: 2016-12-23 17:25:44
Message-ID: CA+TgmoaAOBGJ1pN_vnyzX-3RZ_sj17Pcwa3QE9bhqSoMgdF8Zg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 23, 2016 at 11:59 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> Great, committed. I realize just now that I forgot to credit anyone
>> as a reviewer, but hopefully nobody's going to mind that too much
>> considering this is a purely mechanical patch I wrote in 20 minutes.
>
> Do you have any particular objection to taking the next step of removing
> enum InhOption in favor of making inhOpt a bool? It seems to me that
> stuff like
>
> - bool recurse = interpretInhOption(rv->inhOpt);
> + bool recurse = (rv->inhOpt == INH_YES);
>
> just begs the question of why it's not simply
>
> bool recurse = rv->inh;
>
> Certainly a reader who did not know the history would be confused at
> the useless-looking complexity.

No, not really. I don't feel like it's an improvement, but you and
Alvaro obviously do, so have at it.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-12-23 17:30:27 Re: Declarative partitioning vs. sql_inheritance
Previous Message Tom Lane 2016-12-23 16:59:18 Re: Declarative partitioning vs. sql_inheritance