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
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+
7697string DuckDB::Platform () {
7798 return DuckDBPlatform ();
7899}
0 commit comments