aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvvvv <vvvv@yandex-team.ru>2022-03-14 21:46:39 +0300
committervvvv <vvvv@yandex-team.ru>2022-03-14 21:46:39 +0300
commitc4e8142921088cb37276113036e6af8d59ab4342 (patch)
tree9ce4ca74f57f86a3f2d8911b47f03036c108eec4
parentbec121363fc804f1e5dd687c99c59c943ed57025 (diff)
downloadydb-c4e8142921088cb37276113036e6af8d59ab4342.tar.gz
YQL-13710 move encoding initalization
ref:0988c5b1764eededeee902a39eab9ff375b5ca4b
-rw-r--r--ydb/library/yql/parser/pg_wrapper/parser.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/ydb/library/yql/parser/pg_wrapper/parser.cpp b/ydb/library/yql/parser/pg_wrapper/parser.cpp
index 56d888e98b..b83d197835 100644
--- a/ydb/library/yql/parser/pg_wrapper/parser.cpp
+++ b/ydb/library/yql/parser/pg_wrapper/parser.cpp
@@ -236,8 +236,6 @@ void PGParse(const TString& input, IPGParseEvents& events) {
MemoryContext ctx = NULL;
PgQueryInternalParsetreeAndError parsetree_and_error;
- SetDatabaseEncoding(PG_UTF8);
-
CurrentMemoryContext = (MemoryContext)malloc(sizeof(MemoryContextData));
MemoryContextCreate(CurrentMemoryContext,
T_AllocSetContext,
@@ -302,6 +300,7 @@ extern "C" void setup_pg_thread_cleanup() {
};
static thread_local TThreadCleanup ThreadCleanup;
+ SetDatabaseEncoding(PG_UTF8);
MemoryContextInit();
auto owner = ResourceOwnerCreate(NULL, "TopTransaction");
TopTransactionResourceOwner = owner;