• Robert Haas's avatar
    Abstract logic to allow for multiple kinds of child rels. · 7a39b5e4
    Robert Haas authored
    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
    7a39b5e4
foreign.c 20.1 KB