Skip to content

Commit 0d60f61

Browse files
committed
Apply new patch
1 parent 76ea191 commit 0d60f61

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

src/include/storage/postgres_optimizer.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#pragma once
1010

1111
#include "duckdb/main/config.hpp"
12+
#include "duckdb/optimizer/optimizer_extension.hpp"
1213

1314
namespace duckdb {
1415

src/postgres_extension.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ static void LoadInternal(ExtensionLoader &loader) {
161161
loader.RegisterFunction(postgres_secret_function);
162162

163163
auto &config = DBConfig::GetConfig(loader.GetDatabaseInstance());
164-
config.storage_extensions["postgres_scanner"] = make_uniq<PostgresStorageExtension>();
164+
StorageExtension::Register(config, "postgres_scanner", make_shared_ptr<PostgresStorageExtension>());
165165

166166
config.AddExtensionOption("pg_use_binary_copy", "Whether or not to use BINARY copy to read data",
167167
LogicalType::BOOLEAN, Value::BOOLEAN(true));
@@ -191,9 +191,9 @@ static void LoadInternal(ExtensionLoader &loader) {
191191

192192
OptimizerExtension postgres_optimizer;
193193
postgres_optimizer.optimize_function = PostgresOptimizer::Optimize;
194-
config.optimizer_extensions.push_back(std::move(postgres_optimizer));
194+
OptimizerExtension::Register(config, std::move(postgres_optimizer));
195195

196-
config.extension_callbacks.push_back(make_uniq<PostgresExtensionCallback>());
196+
ExtensionCallback::Register(config, make_shared_ptr<PostgresExtensionCallback>());
197197
for (auto &connection : ConnectionManager::Get(loader.GetDatabaseInstance()).GetConnectionList()) {
198198
connection->registered_state->Insert("postgres_extension", make_shared_ptr<PostgresExtensionState>());
199199
}

src/postgres_storage.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "duckdb.hpp"
22

3+
#include "duckdb/main/settings.hpp"
34
#include "postgres_storage.hpp"
45
#include "storage/postgres_catalog.hpp"
56
#include "duckdb/parser/parsed_data/attach_info.hpp"
@@ -11,7 +12,7 @@ static unique_ptr<Catalog> PostgresAttach(optional_ptr<StorageExtensionInfo> sto
1112
AttachedDatabase &db, const string &name, AttachInfo &info,
1213
AttachOptions &attach_options) {
1314
auto &config = DBConfig::GetConfig(context);
14-
if (!config.options.enable_external_access) {
15+
if (!Settings::Get<EnableExternalAccessSetting>(context)) {
1516
throw PermissionException("Attaching Postgres databases is disabled through configuration");
1617
}
1718
string attach_path = info.path;

src/storage/postgres_index_set.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "storage/postgres_index_set.hpp"
22
#include "storage/postgres_schema_entry.hpp"
33
#include "storage/postgres_transaction.hpp"
4+
#include "duckdb/parser/expression/columnref_expression.hpp"
45
#include "duckdb/parser/parsed_data/create_schema_info.hpp"
56
#include "storage/postgres_index_entry.hpp"
67
#include "duckdb/parser/parsed_expression_iterator.hpp"

0 commit comments

Comments
 (0)