Skip to content

Fix error when locale is misconfigured in yagp-hooks-collector#19

Merged
NJrslv merged 1 commit intoyagp-hooks-collectorfrom
yagp-hooks-collector-fix-locale
Jan 21, 2026
Merged

Fix error when locale is misconfigured in yagp-hooks-collector#19
NJrslv merged 1 commit intoyagp-hooks-collectorfrom
yagp-hooks-collector-fix-locale

Conversation

@NJrslv
Copy link
Copy Markdown

@NJrslv NJrslv commented Jan 21, 2026

The extension generates normalized query text and plan using jumbling functions. Those functions may fail when translating to wide character if the current locale cannot handle the character set.

Fix changes functions that generate normalized query text/plan to noexcept versions so we can check if error occured and continute execution.

The test checks that even when those functions fail, the plan is still executed. This test is partially taken from src/test/regress/gp_locale.sql.

Without this check we would terminate backend with this message: FATAL: Unexpected exception in yagpcc zero-length delimited identifier at or near """"

The extension generates normalized query text and plan using jumbling functions.
Those functions may fail when translating to wide character if the current locale
cannot handle the character set.

Fix changed functions that generate normalized query text/plan to noexcept versions
so we can check if error occured and continute execution.

The test checks that even when those functions fail, the plan is still executed.
This test is partially taken from src/test/regress/gp_locale.sql.
@NJrslv
Copy link
Copy Markdown
Author

NJrslv commented Jan 21, 2026

@NJrslv NJrslv merged commit 3808600 into yagp-hooks-collector Jan 21, 2026
4 checks passed
NJrslv added a commit that referenced this pull request Jan 23, 2026
* ereport(log) bug queries at the end of extension
leborchuk pushed a commit that referenced this pull request Mar 18, 2026
* ereport(log) bug queries at the end of extension
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.

1 participant