Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
daniel-95 merged 1 commit intoREL_2_5fromPBCKP-216-float_locale
Aug 9, 2022
Merged

Conversation

kulaginm
Copy link
Member

No description provided.

@kulaginmkulaginm self-assigned thisJul 4, 2022
@kulaginmkulaginm added this to the2.5.7 milestoneJul 4, 2022
@daniel-95daniel-95force-pushed thePBCKP-216-float_locale branch fromb329493 to158bc71CompareJuly 12, 2022 07:04
src/show.c Outdated
const char *l = loc == LOCALE_PROBACKUP ? "C" : (const char*)getenv("LC_NUMERIC");
// Setting environment-specified locale
#ifdef HAVE_USELOCALE
uselocale(newlocale(LC_NUMERIC_MASK, l, (locale_t) 0));
Copy link
MemberAuthor

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;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Мне кажется, это к сути тикета не относится.

Copy link
MemberAuthor

@kulaginmkulaginmJul 15, 2022
edited
Loading

Choose a reason for hiding this comment

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

Этот кусочек вроде я приводил к единому стилю. Можно оставить, а можно выпилить.

src/show.c Outdated
Comment on lines 104 to 106
#ifdef HAVE__CONFIGTHREADLOCALE
_configthreadlocale(_ENABLE_PER_THREAD_LOCALE);
#endif
Copy link
Collaborator

Choose a reason for hiding this comment

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

Может этот ifdef целиком в memorize_environment_locale унести?

Copy link
Contributor

Choose a reason for hiding this comment

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

В принципе, да

src/show.c Outdated
#ifdef HAVE__CONFIGTHREADLOCALE
_configthreadlocale(_ENABLE_PER_THREAD_LOCALE);
#endif
setlocale(LC_NUMERIC, loc == LOCALE_OUTPUT ? lc_env_locale : "C");
Copy link
Collaborator

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";

Точно это имелось в виду?

Copy link
Contributor

Choose a reason for hiding this comment

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

Опечатка, да

…oing while printing big tables...in order to impose dot-based floating point representation on logging and JSON-representationtags: pg_probackup
@daniel-95daniel-95 changed the base branch fromrelease_2_5_7 toREL_2_5August 9, 2022 09:51
@daniel-95daniel-95 merged commit9f2ded0 intoREL_2_5Aug 9, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@funny-falconfunny-falconfunny-falcon left review comments

@daniel-95daniel-95daniel-95 left review comments

Assignees

@kulaginmkulaginm

Labels
None yet
Projects
None yet
Milestone
2.5.7
Development

Successfully merging this pull request may close these issues.

3 participants
@kulaginm@funny-falcon@daniel-95

[8]ページ先頭

©2009-2025 Movatter.jp