Skip to content

Commit 277fea2

Browse files
committed
vendor: Update vendored sources to duckdb/duckdb@db45dd4
Add release version (duckdb/duckdb#17479)
1 parent eddfea0 commit 277fea2

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

src/duckdb/src/function/table/version/pragma_version.cpp

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#ifndef DUCKDB_PATCH_VERSION
2-
#define DUCKDB_PATCH_VERSION "0-dev3448"
2+
#define DUCKDB_PATCH_VERSION "0-dev3450"
33
#endif
44
#ifndef DUCKDB_MINOR_VERSION
55
#define DUCKDB_MINOR_VERSION 3
@@ -8,10 +8,10 @@
88
#define DUCKDB_MAJOR_VERSION 1
99
#endif
1010
#ifndef DUCKDB_VERSION
11-
#define DUCKDB_VERSION "v1.3.0-dev3448"
11+
#define DUCKDB_VERSION "v1.3.0-dev3450"
1212
#endif
1313
#ifndef DUCKDB_SOURCE_ID
14-
#define DUCKDB_SOURCE_ID "d4d722c1c9"
14+
#define DUCKDB_SOURCE_ID "db45dd41cd"
1515
#endif
1616
#include "duckdb/function/table/system_functions.hpp"
1717
#include "duckdb/main/database.hpp"
@@ -35,6 +35,8 @@ static unique_ptr<FunctionData> PragmaVersionBind(ClientContext &context, TableF
3535
return_types.emplace_back(LogicalType::VARCHAR);
3636
names.emplace_back("source_id");
3737
return_types.emplace_back(LogicalType::VARCHAR);
38+
names.emplace_back("codename");
39+
return_types.emplace_back(LogicalType::VARCHAR);
3840
return nullptr;
3941
}
4042

@@ -51,6 +53,8 @@ static void PragmaVersionFunction(ClientContext &context, TableFunctionInput &da
5153
output.SetCardinality(1);
5254
output.SetValue(0, 0, DuckDB::LibraryVersion());
5355
output.SetValue(1, 0, DuckDB::SourceID());
56+
output.SetValue(2, 0, DuckDB::ReleaseCodename());
57+
5458
data.finished = true;
5559
}
5660

@@ -73,6 +77,23 @@ const char *DuckDB::LibraryVersion() {
7377
return DUCKDB_VERSION;
7478
}
7579

80+
const char *DuckDB::ReleaseCodename() {
81+
// dev releases have no name
82+
if (StringUtil::Contains(DUCKDB_VERSION, "-dev")) {
83+
return "Development Version";
84+
}
85+
if (StringUtil::StartsWith(DUCKDB_VERSION, "v1.2.")) {
86+
return "Histrionicus";
87+
}
88+
if (StringUtil::StartsWith(DUCKDB_VERSION, "v1.3.")) {
89+
return "Ossivalis";
90+
}
91+
// add new version names here
92+
93+
// we should not get here, but let's not fail because of it because tags on forks can be whatever
94+
return "Unknown Version";
95+
}
96+
7697
string DuckDB::Platform() {
7798
return DuckDBPlatform();
7899
}

src/duckdb/src/include/duckdb/main/database.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ class DuckDB {
145145
DUCKDB_API idx_t NumberOfThreads();
146146
DUCKDB_API static const char *SourceID();
147147
DUCKDB_API static const char *LibraryVersion();
148+
DUCKDB_API static const char *ReleaseCodename();
148149
DUCKDB_API static idx_t StandardVectorSize();
149150
DUCKDB_API static string Platform();
150151
DUCKDB_API bool ExtensionIsLoaded(const string &name);

0 commit comments

Comments
 (0)