- Notifications
You must be signed in to change notification settings - Fork91
Pbckp 216 float locale#506
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
b329493 to158bc71Comparesrc/show.c Outdated
| constchar*l=loc==LOCALE_PROBACKUP ?"C" : (constchar*)getenv("LC_NUMERIC"); | ||
| // Setting environment-specified locale | ||
| #ifdefHAVE_USELOCALE | ||
| uselocale(newlocale(LC_NUMERIC_MASK,l, (locale_t)0)); |
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.
А почему мы обходимся без вызова freelocale() здесь? Не теряем ли мы каких-либо ресурсов?
| if (tlinfo->size!=0) | ||
| zratio= ((float)xlog_seg_size*tlinfo->n_xlog_files) /tlinfo->size; | ||
| zratio= ((float)xlog_seg_size*tlinfo->n_xlog_files) /tlinfo->size; |
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.
Мне кажется, это к сути тикета не относится.
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.
Этот кусочек вроде я приводил к единому стилю. Можно оставить, а можно выпилить.
src/show.c Outdated
| #ifdefHAVE__CONFIGTHREADLOCALE | ||
| _configthreadlocale(_ENABLE_PER_THREAD_LOCALE); | ||
| #endif |
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.
Может этот ifdef целиком в memorize_environment_locale унести?
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.
В принципе, да
src/show.c Outdated
| #ifdefHAVE__CONFIGTHREADLOCALE | ||
| _configthreadlocale(_ENABLE_PER_THREAD_LOCALE); | ||
| #endif | ||
| setlocale(LC_NUMERIC,loc==LOCALE_OUTPUT ?lc_env_locale :"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.
Вот тут не получается обратный порядок случайно?
Выше код
loc == LOCALE_OUTPUT ? out_locale : env_locale;а тут
loc == LOCALE_OUTPUT ? lc_env_local : "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.
Опечатка, да
6252d02 to0b22cc5Compare…oing while printing big tables...in order to impose dot-based floating point representation on logging and JSON-representationtags: pg_probackup
0b22cc5 toc0c07acCompare
No description provided.