pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Abstract logic to allow for multiple kinds of child rels.
Date: Tue, 04 Apr 2017 03:04:15 +0000
Message-ID: <E1cvElT-0001ha-DK@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Abstract logic to allow for multiple kinds of child rels.

Currently, the only type of child relation is an "other member rel",
which is the child of a baserel, but in the future joins and even
upper relations may have child rels.  To facilitate that, introduce
macros that test to test for particular RelOptKind values, and use
them in various places where they help to clarify the sense of a test.
(For example, a test may allow RELOPT_OTHER_MEMBER_REL either because
it intends to allow child rels, or because it intends to allow simple
rels.)

Also, remove find_childrel_top_parent, which will not work for a
child rel that is not a baserel.  Instead, add a new RelOptInfo
member top_parent_relids to track the same kind of information in a
more generic manner.

Ashutosh Bapat, slightly tweaked by me.  Review and testing of the
patch set from which this was taken by Rajkumar Raghuwanshi and Rafia
Sabih.

Discussion: http://postgr.es/m/CA+TgmoagTnF2yqR3PT2rv=om=wJiZ4-A+ATwdnriTGku1CLYxA@mail.gmail.com

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/7a39b5e4d11229ece930a51fd7cb29e535db4494

Modified Files
--------------
contrib/postgres_fdw/deparse.c          | 42 +++++++++++----------------
contrib/postgres_fdw/postgres_fdw.c     | 25 ++++++++--------
src/backend/foreign/foreign.c           |  6 ++--
src/backend/optimizer/path/allpaths.c   |  7 +++--
src/backend/optimizer/path/equivclass.c | 19 ++++++++----
src/backend/optimizer/path/indxpath.c   |  3 ++
src/backend/optimizer/plan/createplan.c |  2 +-
src/backend/optimizer/plan/initsplan.c  |  2 +-
src/backend/optimizer/plan/planmain.c   |  3 +-
src/backend/optimizer/plan/planner.c    |  2 +-
src/backend/optimizer/prep/prepunion.c  |  4 +--
src/backend/optimizer/util/plancat.c    |  3 ++
src/backend/optimizer/util/relnode.c    | 51 ++++++++++++++-------------------
src/backend/utils/adt/selfuncs.c        |  2 +-
src/include/nodes/relation.h            | 20 +++++++++++++
src/include/optimizer/pathnode.h        |  3 +-
16 files changed, 104 insertions(+), 90 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1cvElT-0001ha-DK@gemulon.postgresql.org>
Permalink:  ../E1cvElT-0001ha-DK@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1cvElT-0001ha-DK@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: rhaas@postgresql.org
  Subject: Re: pgsql: Abstract logic to allow for multiple kinds of child rels.
  In-Reply-To: <E1cvElT-0001ha-DK@gemulon.postgresql.org>
  References: <E1cvElT-0001ha-DK@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox