Re: Declarative partitioning vs. sql_inheritance

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Dmitry Ivanov <d.ivanov@postgrespro.ru>, Michael Paquier <michael.paquier@gmail.com>, Andres Freund <andres@anarazel.de>, Erik Rijkers <er@xs4all.nl>, Amit Langote <amitlangote09@gmail.com>, Rajkumar Raghuwanshi <rajkumar.raghuwanshi@enterprisedb.com>, Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>, Pg Hackers <pgsql-hackers@postgresql.org>, pgsql-hackers-owner@postgresql.org
Date: 2016-12-23T16:59:18Z
Lists: pgsql-hackers
Robert Haas <robertmhaas@gmail.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.

			regards, tom lane


Commits

  1. Replace enum InhOption with simple boolean.

  2. Remove sql_inheritance GUC.