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

release-2.1: sql: fix pg_catalog.pg_constraint's confkey column #31895

Merged
merged 2 commits into from
Oct 30, 2018

Conversation

BramGruneir
Copy link
Member

Backport 1/1 commits from #31610.

/cc @cockroachdb/release


Prior to this patch, all columns in the index were included instead of only the
ones being used in the foreign key reference.

Fixes #31545.

Release note (bug fix): Fix pg_catalog.pg_constraint's confkey column from
including columns that were not involved in the foreign key reference.

Prior to this patch, all columns in the index were included instead of only the
ones being used in the foreign key reference.

Fixes cockroachdb#31545.

Release note (bug fix): Fix pg_catalog.pg_constraint's confkey column from
including columns that were not involved in the foreign key reference.
@BramGruneir BramGruneir added this to the 2.1.x milestone Oct 25, 2018
@BramGruneir BramGruneir requested review from knz and a team October 25, 2018 21:00
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@BramGruneir
Copy link
Member Author

DNM until after 2.1 release.

if conkey, err = colIDArrayToDatum(con.Index.ColumnIDs); err != nil {
columnIDs := con.Index.ColumnIDs
if int(con.FK.SharedPrefixLen) > len(columnIDs) {
return errors.Errorf(
Copy link
Contributor

Choose a reason for hiding this comment

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

In both master and this backport, please replace this by return pgerror.NewAssertionErrorf(...) and simplify the sentence.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, incoming PR for master.

And I'll add the new commit to this PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

See #31925.

Reword and convert a generic error to a pgerror.

Release note: None
@BramGruneir BramGruneir merged commit 9a2e941 into cockroachdb:release-2.1 Oct 30, 2018
@BramGruneir BramGruneir deleted the backport2.1-31610 branch October 30, 2018 18:35
@knz knz moved this from Triage to Finished (m2.2-1) in (DEPRECATED) SQL Front-end, Lang & Semantics Nov 21, 2018
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

3 participants