Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly set attribute inheritance for external tables #1714

Conversation

danielgustafsson
Copy link
Contributor

External tables doesn't support attribute inheritance, and while there is no syntax to trick plain inheritance into happening it was possible to get inherited attributes by injecting an external table into a partition hierarchy via partition exchange. Commit fcdd853 attempted to fix this but was erroneous and subsequently reverted with 7cfaed3. The pg_dump portion of the original patch was however not reverted and wasn't affecting the issue at hand.

The problem with that commit was that it broke off the inheritance chain too early, the partition still need inheritance to become part of the hierarchy. This commit essentially does the same thing but deeper into the inheritance code path such that it only affects the attislocal attribute in pg_attribute. There was discussion on gpdb-dev covering this.

Also extend the external_tables ICW suite with a test covering this path.

@professor
Copy link
Contributor

Is this pull request ready to be merged?

@danielgustafsson
Copy link
Contributor Author

It's ready for review.

@schubert
Copy link
Contributor

schubert commented Mar 2, 2017

Any concerns or thoughts here @jimmyyih or @HaozhouWang (folks who've touched this code recentlyish)?

@yydzero
Copy link

yydzero commented Mar 3, 2017

@xiong-gang would you please take a look at this PR?

@HaozhouWang
Copy link
Contributor

It is look good to me.

Copy link
Contributor

@adam8157 adam8157 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

External tables doesn't support attribute inheritance, and while
there is no syntax to trick plain inheritance into happening it
was possible to get inherited attributes by injecting an external
table into a partition hierarchy via partition exchange. Commit
fcdd853 attempted to fix this but was erroneous and subsequently
reverted. The problem with that commit was that it broke off the
inheritance chain too early, the partition still need inheritance
to become part of the hierarchy. This commit essentially does the
same thing but deeper into the inheritance code such that it only
affects the attislocal attribute in pg_attribute.

Also extend the external_tables ICW suite with a test covering this
path.
@danielgustafsson
Copy link
Contributor Author

Closing as it has been bitrotting a bit too much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants