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: alias SET client_encoding to SET NAMES #16305

Merged
merged 2 commits into from Jun 4, 2017

Conversation

knz
Copy link
Contributor

@knz knz commented Jun 3, 2017

SET NAMES is the standard SQL form to indicate which encoding the
client uses to specify identifiers/strings to the server.

This patch adds support for this syntax and aliases it to SET client_encoding. RESET NAMES and SHOW NAMES are similarly
supported.

Fixes #16297.

@knz knz requested review from maddyblue and jordanlewis June 3, 2017 16:09
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@jordanlewis
Copy link
Member

:lgtm: assuming you are sure that SET NAMES is supposed to behave identically to client_encoding. A link to some docs might be helpful for future source code readers!


Reviewed 2 of 2 files at r1.
Review status: 0 of 5 files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from Reviewable

@jordanlewis
Copy link
Member

Reviewed 1 of 2 files at r1, 5 of 5 files at r2.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from Reviewable

@knz
Copy link
Contributor Author

knz commented Jun 4, 2017

Thank you. I added the missing URL for clarity.

@knz knz force-pushed the 20170603-set-names branch 2 times, most recently from 15d96c5 to 1ca517a Compare June 4, 2017 03:20
`SET NAMES` is the standard SQL form to indicate which encoding the
client uses to specify identifiers/strings to the server.

Details:
https://www.postgresql.org/docs/9.6/static/multibyte.html#AEN39236

This patch adds support for this syntax and aliases it to `SET
client_encoding`. `RESET NAMES` and `SHOW NAMES` are similarly
supported.
@knz knz merged commit 9814a52 into cockroachdb:master Jun 4, 2017
@knz knz deleted the 20170603-set-names branch June 4, 2017 03:41
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