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: do not show FAMILY if there is only one on SHOW CREATE TABLE #76285

Merged
merged 1 commit into from
Feb 10, 2022

Conversation

otan
Copy link
Contributor

@otan otan commented Feb 9, 2022

Release note (sql change): SHOW CREATE TABLE no longer shows the FAMILY
clause if there is only the PRIMARY family clause.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@otan otan force-pushed the sct branch 3 times, most recently from 4683762 to 65deaed Compare February 9, 2022 11:35
Copy link
Collaborator

@rafiss rafiss left a comment

Choose a reason for hiding this comment

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

lgtm if we get PM signoff

Reviewed all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @otan and @rafiss)


pkg/sql/show_create_clauses.go, line 402 at r1 (raw file):

	// it is named "primary".
	families := desc.GetFamilies()
	if len(families) == 1 && families[0].Name == "primary" {

i think there's a const we can use instead of hard-coding the string

@otan otan marked this pull request as ready for review February 9, 2022 23:16
@otan otan requested a review from a team February 9, 2022 23:16
@otan otan requested a review from a team as a code owner February 9, 2022 23:16
@otan otan requested a review from a team February 9, 2022 23:16
@otan otan requested a review from a team as a code owner February 9, 2022 23:16
@otan otan requested review from adityamaru and removed request for a team February 9, 2022 23:16
@adityamaru
Copy link
Contributor

Bulk changes LGTM!

Release note (sql change): SHOW CREATE TABLE no longer shows the FAMILY
clause if there is only the PRIMARY family clause.
@otan
Copy link
Contributor Author

otan commented Feb 10, 2022

ok has been given

bors r=rafiss

@craig
Copy link
Contributor

craig bot commented Feb 10, 2022

Build succeeded:

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.

4 participants