Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/duckdb/generated_extension_loader_package_build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ int32_t duckdb_extension_core_functions_describe(duckdb_extension_descriptor *de
descriptor->version = 1;
descriptor->name = "core_functions";
descriptor->extension_version = EXT_VERSION_CORE_FUNCTIONS;
descriptor->api_version = "v2.0.1";
descriptor->api_version = "v2.0.2-alpha56987";
descriptor->entry_cpp = (void (*)(void))core_functions_duckdb_cpp_init;
return 0;
}
Expand Down Expand Up @@ -78,7 +78,7 @@ int32_t duckdb_extension_parquet_describe(duckdb_extension_descriptor *descripto
descriptor->version = 1;
descriptor->name = "parquet";
descriptor->extension_version = EXT_VERSION_PARQUET;
descriptor->api_version = "v2.0.1";
descriptor->api_version = "v2.0.2-alpha56987";
descriptor->entry_cpp = (void (*)(void))parquet_duckdb_cpp_init;
return 0;
}
Expand Down Expand Up @@ -111,7 +111,7 @@ int32_t duckdb_extension_icu_describe(duckdb_extension_descriptor *descriptor) {
descriptor->version = 1;
descriptor->name = "icu";
descriptor->extension_version = EXT_VERSION_ICU;
descriptor->api_version = "v2.0.1";
descriptor->api_version = "v2.0.2-alpha56987";
descriptor->entry_cpp = (void (*)(void))icu_duckdb_cpp_init;
return 0;
}
Expand Down Expand Up @@ -144,7 +144,7 @@ int32_t duckdb_extension_json_describe(duckdb_extension_descriptor *descriptor)
descriptor->version = 1;
descriptor->name = "json";
descriptor->extension_version = EXT_VERSION_JSON;
descriptor->api_version = "v2.0.1";
descriptor->api_version = "v2.0.2-alpha56987";
descriptor->entry_cpp = (void (*)(void))json_duckdb_cpp_init;
return 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ static void CreateExternalResourceFunction(ClientContext &context, TableFunction
auto extension = ExternalResourceTypeRegistry::ProvidingExtension(bind_data.type_name);
if (!extension.empty()) {
throw InvalidInputException("create_external_resource: unknown resource type \"%s\": it is provided by the "
"%s extension, which could not be autoloaded. Try: INSTALL %s; LOAD %s;",
bind_data.type_name, extension, extension, extension);
"%s extension, which could not be autoloaded. Try: INSTALL AND LOAD %s;",
bind_data.type_name, extension, extension);
}
throw InvalidInputException("create_external_resource: unknown resource type \"%s\"", bind_data.type_name);
}
Expand Down
12 changes: 12 additions & 0 deletions src/duckdb/src/function/table/system/external_resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "duckdb/common/exception.hpp"
#include "duckdb/common/string_util.hpp"
#include "duckdb/common/types/value.hpp"
#include "duckdb/main/database.hpp"
#include "duckdb/main/external_resource_type_registry.hpp"
#include "duckdb/main/external_resources_manager.hpp"
#include "duckdb/parser/keyword_helper.hpp"
Expand Down Expand Up @@ -81,6 +82,10 @@ static unique_ptr<TableRef> ExternalResourcesBindReplace(ClientContext &context,
branches.push_back("SELECT name, type, managed, NULL::VARCHAR AS state, NULL::VARCHAR AS reference, uri, "
"attached_db_type, handle FROM " +
RegistryScan(params.type));
if (!params.type.empty()) {
// An unknown type autoloads the extension known to provide it, like an unknown function does
ExternalResourceTypeRegistry::LookupOrAutoload(DatabaseInstance::GetDatabase(context), params.type);
}
bool matched = false;
for (auto &type : ExternalResourceTypeRegistry::Get(context).List()) {
if (!MatchesType(params.type, type.name)) {
Expand Down Expand Up @@ -112,6 +117,13 @@ static unique_ptr<TableRef> ExternalResourcesBindReplace(ClientContext &context,
// opaque type) has nothing to discover, like a type without a list callback. A type neither knows is most
// likely a typo, or a missing extension.
if (!matched && !params.type.empty() && !RegistryHasType(context, params.type)) {
auto extension = ExternalResourceTypeRegistry::ProvidingExtension(params.type);
if (!extension.empty()) {
throw InvalidInputException(
"duckdb_external_resources: unknown resource type \"%s\": it is provided by the "
"%s extension, which could not be autoloaded. Try: INSTALL AND LOAD %s;",
params.type, extension, extension);
}
throw InvalidInputException("duckdb_external_resources: unknown resource type \"%s\"", params.type);
}
Parser parser(context);
Expand Down
6 changes: 3 additions & 3 deletions src/duckdb/src/function/table/version/pragma_version.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DUCKDB_PATCH_VERSION
#define DUCKDB_PATCH_VERSION "1"
#define DUCKDB_PATCH_VERSION "2-alpha56987"
#endif
#ifndef DUCKDB_MINOR_VERSION
#define DUCKDB_MINOR_VERSION 0
Expand All @@ -8,10 +8,10 @@
#define DUCKDB_MAJOR_VERSION 2
#endif
#ifndef DUCKDB_VERSION
#define DUCKDB_VERSION "v2.0.1"
#define DUCKDB_VERSION "v2.0.2-alpha56987"
#endif
#ifndef DUCKDB_SOURCE_ID
#define DUCKDB_SOURCE_ID "8d78114e90"
#define DUCKDB_SOURCE_ID "b3a028e6c8"
#endif
#include "duckdb/function/table/system_functions.hpp"
#include "duckdb/main/database.hpp"
Expand Down
Loading