-
Notifications
You must be signed in to change notification settings - Fork 638
YQL-17371: fix ASCII-compatibe bytea output in pgrun #1356
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
YQL-17371: fix ASCII-compatibe bytea output in pgrun #1356
Conversation
⚪
|
[] (ui64 acc, char c) { | ||
return acc + ((c == '\\') | ||
? 2 | ||
: ((ui8)c < 0x20 || 0x7e < (ui8)c) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
давай тут magic уберем и вынесем куда-нибудь (можно в макрос/constexpr функцию)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Это взято из кода PG. Можно поправить, но, в целом, стандартная штука же
if (c == '\\') { | ||
*p++ = '\\'; | ||
*p++ = '\\'; | ||
} else if ((ui8)c < 0x20 || 0x7e < (ui8)c) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
тот же самый magic
No description provided.