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

cli: format byte results like in SQL #28494

Merged
merged 1 commit into from
Aug 14, 2018
Merged

Conversation

knz
Copy link
Contributor

@knz knz commented Aug 11, 2018

Fixes #20525.

This patch changes the formatting of byte array results to become
the same as converting a byte array to a string using a cast,
with bytea_output set to escape.

This is both a simplification of the code and a reduction of UX
surprise.

Release note (cli change): cockroach commands that print SQL
results containing byte array now print them as if they
were converted by a SQL cast to the string type.

This patch changes the formatting of byte array results to become
the same as converting a byte array to a string using a cast,
with `bytea_output` set to `escape`.

This is both a simplification of the code and a reduction of UX
surprise.

Release note (cli change): `cockroach` commands that print SQL
results containing byte array now print them as if they
were converted by a SQL cast to the `string` type.
@knz knz added this to To do in DB Server & Security via automation Aug 11, 2018
@knz knz requested a review from a team as a code owner August 11, 2018 21:31
@knz knz requested a review from a team August 11, 2018 21:31
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@knz knz moved this from To do to In progress in DB Server & Security Aug 11, 2018
Copy link
Member

@BramGruneir BramGruneir left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained

Copy link
Member

@BramGruneir BramGruneir left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale)

@knz
Copy link
Contributor Author

knz commented Aug 14, 2018 via email

craig bot pushed a commit that referenced this pull request Aug 14, 2018
28494: cli: format byte results like in SQL r=knz a=knz

Fixes #20525.

This patch changes the formatting of byte array results to become
the same as converting a byte array to a string using a cast,
with `bytea_output` set to `escape`.

This is both a simplification of the code and a reduction of UX
surprise.

Release note (cli change): `cockroach` commands that print SQL
results containing byte array now print them as if they
were converted by a SQL cast to the `string` type.

Co-authored-by: Raphael 'kena' Poss <knz@cockroachlabs.com>
@craig
Copy link
Contributor

craig bot commented Aug 14, 2018

Build succeeded

@craig craig bot merged commit 784b7f8 into cockroachdb:master Aug 14, 2018
DB Server & Security automation moved this from In progress to Done Aug 14, 2018
@knz knz deleted the 20180811-bytes-out branch August 17, 2018 13:52
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