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

sql: add pg_class.relpartbound column #61162

Merged
merged 1 commit into from
Feb 26, 2021
Merged

Conversation

rafiss
Copy link
Collaborator

@rafiss rafiss commented Feb 26, 2021

DBeaver relies on this column existing.

Release note (sql change): The pg_catalog.pg_class table now has a
relpartbound column. This is only for compatibility, and the column
value is always NULL.

Release justification: Low-risk, high-benefit change to existing
functionality.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

DBeaver relies on this column existing.

Release note (sql change): The pg_catalog.pg_class table now has a
relpartbound column. This is only for compatibility, and the column
value is always NULL.

Release justification: Low-risk, high-benefit change to existing
functionality.
@rafiss rafiss requested a review from a team as a code owner February 26, 2021 06:16
@rafiss rafiss requested review from RichardJCai and a team February 26, 2021 16:00
diff, ok := columns[columnName]
if !ok {
if !ok || diff == nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

Wait, if the column is expected to be missing and is stored as nil, shouldn't we return false so it is ignored in pg_catalog_test.go line 204?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

well if we return false, then line 204 will skip over this, so the test will pass when it should not.

ah actually, the root issue is that in general, we do want to allow crdb to have extra columns that are not in postgres, since sometimes we add additional columns for other reasons. so this change here will make it so that if we do add a column that overlaps with a postgres column, then it will check that it's an expected OID.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah I thought the intent was for the test to "pass" if it was an expected difference.

so this change here will make it so that if we do add a column that overlaps with a postgres column, then it will check that it's an expected OID.

Gotcha

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oh yeah i think this counts as an unexpected difference so it should fail

the reason i added this is that without this check, the test would fail with a nil pointer error.

@rafiss
Copy link
Collaborator Author

rafiss commented Feb 26, 2021

thanks for the review!

bors r=RichardJCai

@craig
Copy link
Contributor

craig bot commented Feb 26, 2021

Build succeeded:

@craig craig bot merged commit 45deb66 into cockroachdb:master Feb 26, 2021
@rafiss rafiss deleted the relpartbound branch February 27, 2021 15:57
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.

3 participants