summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxenoxeno <[email protected]>2023-06-28 14:58:50 +0300
committerxenoxeno <[email protected]>2023-06-28 14:58:50 +0300
commit06aba67082f23c0af963f8044e45896ac57920e4 (patch)
tree6e2afd9f82cf57467d28c2755f87d5319e14e434
parentfc63fc81dc502abbe92482b0ceccd3eb7841e41e (diff)
improve pgs compatibility for ; query
-rw-r--r--ydb/core/local_pgwire/local_pgwire_util.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/ydb/core/local_pgwire/local_pgwire_util.h b/ydb/core/local_pgwire/local_pgwire_util.h
index c5a1120d7d1..cfe4613ae55 100644
--- a/ydb/core/local_pgwire/local_pgwire_util.h
+++ b/ydb/core/local_pgwire/local_pgwire_util.h
@@ -227,22 +227,17 @@ inline TConvertedQuery ConvertQuery(const TParsedStatement& statement) {
};
}
-inline bool IsWhitespaceASCII(char c)
-{
- return c == ' ' || c == '\t' || c == '\n' || c == '\r' || c == '\f' || c == '\v';
+inline bool IsQueryEmptyChar(char c) {
+ return c == ' ' || c == ';' || c == '\t' || c == '\n' || c == '\r' || c == '\f' || c == '\v';
}
-inline bool IsWhitespace(TStringBuf query) {
+inline bool IsQueryEmpty(TStringBuf query) {
for (char c : query) {
- if (!IsWhitespaceASCII(c)) {
+ if (!IsQueryEmptyChar(c)) {
return false;
}
}
return true;
}
-inline bool IsQueryEmpty(TStringBuf query) {
- return IsWhitespace(query);
-}
-
} //namespace NLocalPgWire