feat: add common_version customization (#7869)

* feat: add product name customization

* chore: update tests
This commit is contained in:
Ning Sun
2026-03-26 18:18:06 +08:00
committed by GitHub
parent 1118fe243f
commit 08ded45c7a
15 changed files with 44 additions and 17 deletions

View File

@@ -43,14 +43,19 @@ impl Function for VersionFunction {
let version = match func_ctx.query_ctx.channel() {
Channel::Mysql => {
format!(
"{}-greptimedb-{}",
"{}-{}-{}",
std::env::var("GREPTIMEDB_MYSQL_SERVER_VERSION")
.unwrap_or_else(|_| "8.4.2".to_string()),
common_version::product_name(),
common_version::version()
)
}
Channel::Postgres => {
format!("PostgreSQL 16.3 GreptimeDB {}", common_version::version())
format!(
"PostgreSQL 16.3 {} {}",
common_version::product_name(),
common_version::version()
)
}
_ => common_version::version().to_string(),
};