duckdb 0.8.2-dev3300.0 → 0.8.2-dev3456.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/binding.gyp +3 -1
  2. package/configure.py +3 -0
  3. package/package.json +1 -1
  4. package/src/duckdb/src/catalog/catalog.cpp +144 -63
  5. package/src/duckdb/src/common/exception.cpp +13 -0
  6. package/src/duckdb/src/common/file_system.cpp +21 -6
  7. package/src/duckdb/src/core_functions/scalar/enum/enum_functions.cpp +16 -12
  8. package/src/duckdb/src/core_functions/scalar/generic/current_setting.cpp +3 -1
  9. package/src/duckdb/src/execution/operator/helper/physical_load.cpp +2 -1
  10. package/src/duckdb/src/execution/operator/helper/physical_reset.cpp +3 -1
  11. package/src/duckdb/src/execution/operator/helper/physical_set.cpp +3 -1
  12. package/src/duckdb/src/function/pragma/pragma_queries.cpp +2 -1
  13. package/src/duckdb/src/function/table/read_csv.cpp +8 -3
  14. package/src/duckdb/src/function/table/version/pragma_version.cpp +2 -2
  15. package/src/duckdb/src/include/duckdb/catalog/catalog.hpp +20 -5
  16. package/src/duckdb/src/include/duckdb/common/exception.hpp +15 -1
  17. package/src/duckdb/src/include/duckdb/main/client_config.hpp +2 -0
  18. package/src/duckdb/src/include/duckdb/main/config.hpp +12 -0
  19. package/src/duckdb/src/include/duckdb/main/extension/generated_extension_loader.hpp +6 -1
  20. package/src/duckdb/src/include/duckdb/main/extension_entries.hpp +209 -151
  21. package/src/duckdb/src/include/duckdb/main/extension_helper.hpp +34 -3
  22. package/src/duckdb/src/include/duckdb/main/settings.hpp +30 -0
  23. package/src/duckdb/src/include/duckdb/parser/parsed_data/load_info.hpp +4 -0
  24. package/src/duckdb/src/include/duckdb/planner/binder.hpp +4 -0
  25. package/src/duckdb/src/main/config.cpp +3 -0
  26. package/src/duckdb/src/main/extension/extension_helper.cpp +57 -0
  27. package/src/duckdb/src/main/extension/extension_install.cpp +46 -7
  28. package/src/duckdb/src/main/settings/settings.cpp +46 -0
  29. package/src/duckdb/src/parser/transform/statement/transform_load.cpp +1 -0
  30. package/src/duckdb/src/planner/binder/tableref/bind_basetableref.cpp +69 -23
  31. package/src/duckdb/src/planner/expression_binder/order_binder.cpp +5 -4
  32. package/src/duckdb/src/storage/serialization/serialize_parse_info.cpp +2 -0
  33. package/src/duckdb/third_party/libpg_query/include/nodes/parsenodes.hpp +1 -0
  34. package/src/duckdb/third_party/libpg_query/src_backend_parser_gram.cpp +8747 -8821
@@ -70,6 +70,9 @@ static ConfigurationOption internal_options[] = {DUCKDB_GLOBAL(AccessModeSetting
70
70
  DUCKDB_GLOBAL(EnableFSSTVectors),
71
71
  DUCKDB_GLOBAL(AllowUnsignedExtensionsSetting),
72
72
  DUCKDB_LOCAL(CustomExtensionRepository),
73
+ DUCKDB_LOCAL(AutoloadExtensionRepository),
74
+ DUCKDB_GLOBAL(AutoinstallKnownExtensions),
75
+ DUCKDB_GLOBAL(AutoloadKnownExtensions),
73
76
  DUCKDB_GLOBAL(EnableObjectCacheSetting),
74
77
  DUCKDB_GLOBAL(EnableHTTPMetadataCacheSetting),
75
78
  DUCKDB_LOCAL(EnableProfilingSetting),
@@ -126,6 +126,7 @@ DefaultExtension ExtensionHelper::GetDefaultExtension(idx_t index) {
126
126
  //===--------------------------------------------------------------------===//
127
127
  static const char *auto_install[] = {"motherduck", "postgres_scanner", "sqlite_scanner", nullptr};
128
128
 
129
+ // TODO: unify with new autoload mechanism
129
130
  bool ExtensionHelper::AllowAutoInstall(const string &extension) {
130
131
  auto lcase = StringUtil::Lower(extension);
131
132
  for (idx_t i = 0; auto_install[i]; i++) {
@@ -136,6 +137,62 @@ bool ExtensionHelper::AllowAutoInstall(const string &extension) {
136
137
  return false;
137
138
  }
138
139
 
140
+ bool ExtensionHelper::CanAutoloadExtension(const string &ext_name) {
141
+ #ifdef DUCKDB_DISABLE_EXTENSION_LOAD
142
+ return false;
143
+ #endif
144
+
145
+ if (ext_name.empty()) {
146
+ return false;
147
+ }
148
+ for (const auto &ext : AUTOLOADABLE_EXTENSIONS) {
149
+ if (ext_name == ext) {
150
+ return true;
151
+ }
152
+ }
153
+ return false;
154
+ }
155
+
156
+ string ExtensionHelper::AddExtensionInstallHintToErrorMsg(ClientContext &context, const string &base_error,
157
+ const string &extension_name) {
158
+ auto &dbconfig = DBConfig::GetConfig(context);
159
+ string install_hint;
160
+
161
+ if (!ExtensionHelper::CanAutoloadExtension(extension_name)) {
162
+ install_hint = "Please try installing and loading the " + extension_name + " extension:\nINSTALL " +
163
+ extension_name + ";\nLOAD " + extension_name + ";\n\n";
164
+ } else if (!dbconfig.options.autoload_known_extensions) {
165
+ install_hint =
166
+ "Please try installing and loading the " + extension_name + " extension by running:\nINSTALL " +
167
+ extension_name + ";\nLOAD " + extension_name +
168
+ ";\n\nAlternatively, consider enabling auto-install "
169
+ "and auto-load by running:\nSET autoinstall_known_extensions=1;\nSET autoload_known_extensions=1;";
170
+ } else if (!dbconfig.options.autoinstall_known_extensions) {
171
+ install_hint =
172
+ "Please try installing the " + extension_name + " extension by running:\nINSTALL " + extension_name +
173
+ ";\n\nAlternatively, consider enabling autoinstall by running:\nSET autoinstall_known_extensions=1;";
174
+ }
175
+
176
+ if (!install_hint.empty()) {
177
+ return base_error + "\n\n" + install_hint;
178
+ }
179
+
180
+ return base_error;
181
+ }
182
+
183
+ void ExtensionHelper::AutoLoadExtension(ClientContext &context, const string &extension_name) {
184
+ auto &dbconfig = DBConfig::GetConfig(context);
185
+ try {
186
+ if (dbconfig.options.autoinstall_known_extensions) {
187
+ ExtensionHelper::InstallExtension(context, extension_name, false,
188
+ context.config.autoinstall_extension_repo);
189
+ }
190
+ ExtensionHelper::LoadExternalExtension(context, extension_name);
191
+ } catch (Exception &e) {
192
+ throw AutoloadException(extension_name, e);
193
+ }
194
+ }
195
+
139
196
  //===--------------------------------------------------------------------===//
140
197
  // Load Statically Compiled Extension
141
198
  //===--------------------------------------------------------------------===//
@@ -117,16 +117,18 @@ bool ExtensionHelper::CreateSuggestions(const string &extension_name, string &me
117
117
  return false;
118
118
  }
119
119
 
120
- void ExtensionHelper::InstallExtension(DBConfig &config, FileSystem &fs, const string &extension, bool force_install) {
120
+ void ExtensionHelper::InstallExtension(DBConfig &config, FileSystem &fs, const string &extension, bool force_install,
121
+ const string &repository) {
121
122
  #ifdef WASM_LOADABLE_EXTENSIONS
122
123
  // Install is currently a no-op
123
124
  return;
124
125
  #endif
125
126
  string local_path = ExtensionDirectory(config, fs);
126
- InstallExtensionInternal(config, nullptr, fs, local_path, extension, force_install);
127
+ InstallExtensionInternal(config, nullptr, fs, local_path, extension, force_install, repository);
127
128
  }
128
129
 
129
- void ExtensionHelper::InstallExtension(ClientContext &context, const string &extension, bool force_install) {
130
+ void ExtensionHelper::InstallExtension(ClientContext &context, const string &extension, bool force_install,
131
+ const string &repository) {
130
132
  #ifdef WASM_LOADABLE_EXTENSIONS
131
133
  // Install is currently a no-op
132
134
  return;
@@ -135,7 +137,7 @@ void ExtensionHelper::InstallExtension(ClientContext &context, const string &ext
135
137
  auto &fs = FileSystem::GetFileSystem(context);
136
138
  string local_path = ExtensionDirectory(context);
137
139
  auto &client_config = ClientConfig::GetConfig(context);
138
- InstallExtensionInternal(config, &client_config, fs, local_path, extension, force_install);
140
+ InstallExtensionInternal(config, &client_config, fs, local_path, extension, force_install, repository);
139
141
  }
140
142
 
141
143
  unsafe_unique_array<data_t> ReadExtensionFileFromDisk(FileSystem &fs, const string &path, idx_t &file_size) {
@@ -156,7 +158,8 @@ void WriteExtensionFileToDisk(FileSystem &fs, const string &path, void *data, id
156
158
  }
157
159
 
158
160
  void ExtensionHelper::InstallExtensionInternal(DBConfig &config, ClientConfig *client_config, FileSystem &fs,
159
- const string &local_path, const string &extension, bool force_install) {
161
+ const string &local_path, const string &extension, bool force_install,
162
+ const string &repository) {
160
163
  #ifdef DUCKDB_DISABLE_EXTENSION_LOAD
161
164
  throw PermissionException("Installing external extensions is disabled through a compile time flag");
162
165
  #else
@@ -181,6 +184,9 @@ void ExtensionHelper::InstallExtensionInternal(DBConfig &config, ClientConfig *c
181
184
  auto in_buffer = ReadExtensionFileFromDisk(fs, extension, file_size);
182
185
  WriteExtensionFileToDisk(fs, temp_path, in_buffer.get(), file_size);
183
186
 
187
+ if (fs.FileExists(local_extension_path) && force_install) {
188
+ fs.RemoveFile(local_extension_path);
189
+ }
184
190
  fs.MoveFile(temp_path, local_extension_path);
185
191
  return;
186
192
  } else if (StringUtil::Contains(extension, "/") && !is_http_url) {
@@ -191,10 +197,17 @@ void ExtensionHelper::InstallExtensionInternal(DBConfig &config, ClientConfig *c
191
197
  throw BinderException("Remote extension installation is disabled through configuration");
192
198
  #else
193
199
 
194
- string default_endpoint = "http://extensions.duckdb.org";
195
200
  string versioned_path = "/${REVISION}/${PLATFORM}/${NAME}.duckdb_extension.gz";
196
201
  string custom_endpoint = client_config ? client_config->custom_extension_repo : string();
197
- string &endpoint = !custom_endpoint.empty() ? custom_endpoint : default_endpoint;
202
+ string endpoint;
203
+ if (!repository.empty()) {
204
+ endpoint = repository;
205
+ } else if (!custom_endpoint.empty()) {
206
+ endpoint = custom_endpoint;
207
+ } else {
208
+ endpoint = "http://extensions.duckdb.org";
209
+ }
210
+
198
211
  string url_template = endpoint + versioned_path;
199
212
 
200
213
  if (is_http_url) {
@@ -213,6 +226,28 @@ void ExtensionHelper::InstallExtensionInternal(DBConfig &config, ClientConfig *c
213
226
  throw IOException("No slash in URL template");
214
227
  }
215
228
 
229
+ // Special case to install extension from a local file, useful for testing
230
+ if (!StringUtil::Contains(endpoint, "http://")) {
231
+ string file = fs.ConvertSeparators(url);
232
+ if (!fs.FileExists(file)) {
233
+ // check for non-gzipped variant
234
+ file = file.substr(0, file.size() - 3);
235
+ if (!fs.FileExists(file)) {
236
+ throw IOException("Failed to copy local extension \"%s\" at PATH \"%s\"\n", extension_name, file);
237
+ }
238
+ }
239
+ auto read_handle = fs.OpenFile(file, FileFlags::FILE_FLAGS_READ);
240
+ auto test_data = std::unique_ptr<unsigned char[]> {new unsigned char[read_handle->GetFileSize()]};
241
+ read_handle->Read(test_data.get(), read_handle->GetFileSize());
242
+ WriteExtensionFileToDisk(fs, temp_path, (void *)test_data.get(), read_handle->GetFileSize());
243
+
244
+ if (fs.FileExists(local_extension_path) && force_install) {
245
+ fs.RemoveFile(local_extension_path);
246
+ }
247
+ fs.MoveFile(temp_path, local_extension_path);
248
+ return;
249
+ }
250
+
216
251
  // Push the substring [last, next) on to splits
217
252
  auto hostname_without_http = no_http.substr(0, next);
218
253
  auto url_local_part = no_http.substr(next);
@@ -243,6 +278,10 @@ void ExtensionHelper::InstallExtensionInternal(DBConfig &config, ClientConfig *c
243
278
  auto decompressed_body = GZipFileSystem::UncompressGZIPString(res->body);
244
279
 
245
280
  WriteExtensionFileToDisk(fs, temp_path, (void *)decompressed_body.data(), decompressed_body.size());
281
+
282
+ if (fs.FileExists(local_extension_path) && force_install) {
283
+ fs.RemoveFile(local_extension_path);
284
+ }
246
285
  fs.MoveFile(temp_path, local_extension_path);
247
286
  #endif
248
287
  #endif
@@ -526,6 +526,52 @@ Value CustomExtensionRepository::GetSetting(ClientContext &context) {
526
526
  return Value(ClientConfig::GetConfig(context).custom_extension_repo);
527
527
  }
528
528
 
529
+ //===--------------------------------------------------------------------===//
530
+ // Autoload Extension Repository
531
+ //===--------------------------------------------------------------------===//
532
+ void AutoloadExtensionRepository::ResetLocal(ClientContext &context) {
533
+ ClientConfig::GetConfig(context).autoinstall_extension_repo = ClientConfig().autoinstall_extension_repo;
534
+ }
535
+
536
+ void AutoloadExtensionRepository::SetLocal(ClientContext &context, const Value &input) {
537
+ ClientConfig::GetConfig(context).autoinstall_extension_repo = StringUtil::Lower(input.ToString());
538
+ }
539
+
540
+ Value AutoloadExtensionRepository::GetSetting(ClientContext &context) {
541
+ return Value(ClientConfig::GetConfig(context).autoinstall_extension_repo);
542
+ }
543
+
544
+ //===--------------------------------------------------------------------===//
545
+ // Autoinstall Known Extensions
546
+ //===--------------------------------------------------------------------===//
547
+ void AutoinstallKnownExtensions::SetGlobal(DatabaseInstance *db, DBConfig &config, const Value &input) {
548
+ config.options.autoinstall_known_extensions = input.GetValue<bool>();
549
+ }
550
+
551
+ void AutoinstallKnownExtensions::ResetGlobal(DatabaseInstance *db, DBConfig &config) {
552
+ config.options.autoinstall_known_extensions = DBConfig().options.autoinstall_known_extensions;
553
+ }
554
+
555
+ Value AutoinstallKnownExtensions::GetSetting(ClientContext &context) {
556
+ auto &config = DBConfig::GetConfig(context);
557
+ return Value::BOOLEAN(config.options.autoinstall_known_extensions);
558
+ }
559
+ //===--------------------------------------------------------------------===//
560
+ // Autoload Known Extensions
561
+ //===--------------------------------------------------------------------===//
562
+ void AutoloadKnownExtensions::SetGlobal(DatabaseInstance *db, DBConfig &config, const Value &input) {
563
+ config.options.autoload_known_extensions = input.GetValue<bool>();
564
+ }
565
+
566
+ void AutoloadKnownExtensions::ResetGlobal(DatabaseInstance *db, DBConfig &config) {
567
+ config.options.autoload_known_extensions = DBConfig().options.autoload_known_extensions;
568
+ }
569
+
570
+ Value AutoloadKnownExtensions::GetSetting(ClientContext &context) {
571
+ auto &config = DBConfig::GetConfig(context);
572
+ return Value::BOOLEAN(config.options.autoload_known_extensions);
573
+ }
574
+
529
575
  //===--------------------------------------------------------------------===//
530
576
  // Enable Progress Bar
531
577
  //===--------------------------------------------------------------------===//
@@ -9,6 +9,7 @@ unique_ptr<LoadStatement> Transformer::TransformLoad(duckdb_libpgquery::PGLoadSt
9
9
  auto load_stmt = make_uniq<LoadStatement>();
10
10
  auto load_info = make_uniq<LoadInfo>();
11
11
  load_info->filename = std::string(stmt.filename);
12
+ load_info->repository = std::string(stmt.repository);
12
13
  switch (stmt.load_type) {
13
14
  case duckdb_libpgquery::PG_LOAD_TYPE_LOAD:
14
15
  load_info->load_type = LoadType::LOAD;
@@ -10,6 +10,7 @@
10
10
  #include "duckdb/planner/operator/logical_get.hpp"
11
11
  #include "duckdb/parser/statement/select_statement.hpp"
12
12
  #include "duckdb/common/string_util.hpp"
13
+ #include "duckdb/main/extension_helper.hpp"
13
14
  #include "duckdb/parser/tableref/table_function_ref.hpp"
14
15
  #include "duckdb/main/config.hpp"
15
16
  #include "duckdb/planner/tableref/bound_dummytableref.hpp"
@@ -17,6 +18,62 @@
17
18
 
18
19
  namespace duckdb {
19
20
 
21
+ static bool TryLoadExtensionForReplacementScan(ClientContext &context, const string &table_name) {
22
+ auto lower_name = StringUtil::Lower(table_name);
23
+ auto &dbconfig = DBConfig::GetConfig(context);
24
+
25
+ if (!dbconfig.options.autoload_known_extensions) {
26
+ return false;
27
+ }
28
+
29
+ for (const auto &entry : EXTENSION_FILE_POSTFIXES) {
30
+ if (StringUtil::EndsWith(lower_name, entry.name)) {
31
+ ExtensionHelper::AutoLoadExtension(context, entry.extension);
32
+ return true;
33
+ }
34
+ }
35
+
36
+ for (const auto &entry : EXTENSION_FILE_CONTAINS) {
37
+ if (StringUtil::Contains(lower_name, entry.name)) {
38
+ ExtensionHelper::AutoLoadExtension(context, entry.extension);
39
+ return true;
40
+ }
41
+ }
42
+
43
+ return false;
44
+ }
45
+
46
+ unique_ptr<BoundTableRef> Binder::BindWithReplacementScan(ClientContext &context, const string &table_name,
47
+ BaseTableRef &ref) {
48
+ auto &config = DBConfig::GetConfig(context);
49
+ if (context.config.use_replacement_scans) {
50
+ for (auto &scan : config.replacement_scans) {
51
+ auto replacement_function = scan.function(context, table_name, scan.data.get());
52
+ if (replacement_function) {
53
+ if (!ref.alias.empty()) {
54
+ // user-provided alias overrides the default alias
55
+ replacement_function->alias = ref.alias;
56
+ } else if (replacement_function->alias.empty()) {
57
+ // if the replacement scan itself did not provide an alias we use the table name
58
+ replacement_function->alias = ref.table_name;
59
+ }
60
+ if (replacement_function->type == TableReferenceType::TABLE_FUNCTION) {
61
+ auto &table_function = replacement_function->Cast<TableFunctionRef>();
62
+ table_function.column_name_alias = ref.column_name_alias;
63
+ } else if (replacement_function->type == TableReferenceType::SUBQUERY) {
64
+ auto &subquery = replacement_function->Cast<SubqueryRef>();
65
+ subquery.column_name_alias = ref.column_name_alias;
66
+ } else {
67
+ throw InternalException("Replacement scan should return either a table function or a subquery");
68
+ }
69
+ return Bind(*replacement_function);
70
+ }
71
+ }
72
+ }
73
+
74
+ return nullptr;
75
+ }
76
+
20
77
  unique_ptr<BoundTableRef> Binder::Bind(BaseTableRef &ref) {
21
78
  QueryErrorContext error_context(root_statement, ref.query_location);
22
79
  // CTEs and views are also referred to using BaseTableRefs, hence need to distinguish here
@@ -108,29 +165,18 @@ unique_ptr<BoundTableRef> Binder::Bind(BaseTableRef &ref) {
108
165
  }
109
166
  table_name += (!table_name.empty() ? "." : "") + ref.table_name;
110
167
  // table could not be found: try to bind a replacement scan
111
- auto &config = DBConfig::GetConfig(context);
112
- if (context.config.use_replacement_scans) {
113
- for (auto &scan : config.replacement_scans) {
114
- auto replacement_function = scan.function(context, table_name, scan.data.get());
115
- if (replacement_function) {
116
- if (!ref.alias.empty()) {
117
- // user-provided alias overrides the default alias
118
- replacement_function->alias = ref.alias;
119
- } else if (replacement_function->alias.empty()) {
120
- // if the replacement scan itself did not provide an alias we use the table name
121
- replacement_function->alias = ref.table_name;
122
- }
123
- if (replacement_function->type == TableReferenceType::TABLE_FUNCTION) {
124
- auto &table_function = replacement_function->Cast<TableFunctionRef>();
125
- table_function.column_name_alias = ref.column_name_alias;
126
- } else if (replacement_function->type == TableReferenceType::SUBQUERY) {
127
- auto &subquery = replacement_function->Cast<SubqueryRef>();
128
- subquery.column_name_alias = ref.column_name_alias;
129
- } else {
130
- throw InternalException("Replacement scan should return either a table function or a subquery");
131
- }
132
- return Bind(*replacement_function);
133
- }
168
+ // Try replacement scan bind
169
+ auto replacement_scan_bind_result = BindWithReplacementScan(context, table_name, ref);
170
+ if (replacement_scan_bind_result) {
171
+ return replacement_scan_bind_result;
172
+ }
173
+
174
+ // Try autoloading an extension, then retry the replacement scan bind
175
+ auto extension_loaded = TryLoadExtensionForReplacementScan(context, table_name);
176
+ if (extension_loaded) {
177
+ replacement_scan_bind_result = BindWithReplacementScan(context, table_name, ref);
178
+ if (replacement_scan_bind_result) {
179
+ return replacement_scan_bind_result;
134
180
  }
135
181
  }
136
182
 
@@ -1,14 +1,14 @@
1
1
  #include "duckdb/planner/expression_binder/order_binder.hpp"
2
2
 
3
3
  #include "duckdb/parser/expression/columnref_expression.hpp"
4
- #include "duckdb/parser/expression/positional_reference_expression.hpp"
5
4
  #include "duckdb/parser/expression/constant_expression.hpp"
5
+ #include "duckdb/parser/expression/parameter_expression.hpp"
6
+ #include "duckdb/parser/expression/positional_reference_expression.hpp"
6
7
  #include "duckdb/parser/expression/star_expression.hpp"
7
8
  #include "duckdb/parser/query_node/select_node.hpp"
8
- #include "duckdb/planner/expression_binder.hpp"
9
- #include "duckdb/parser/expression/parameter_expression.hpp"
10
- #include "duckdb/planner/expression/bound_parameter_expression.hpp"
11
9
  #include "duckdb/planner/binder.hpp"
10
+ #include "duckdb/planner/expression/bound_parameter_expression.hpp"
11
+ #include "duckdb/planner/expression_binder.hpp"
12
12
 
13
13
  namespace duckdb {
14
14
 
@@ -42,6 +42,7 @@ unique_ptr<Expression> OrderBinder::CreateExtraReference(unique_ptr<ParsedExpres
42
42
  if (!extra_list) {
43
43
  throw InternalException("CreateExtraReference called without extra_list");
44
44
  }
45
+ projection_map[*expr] = extra_list->size();
45
46
  auto result = CreateProjectionReference(*expr, extra_list->size());
46
47
  extra_list->push_back(std::move(expr));
47
48
  return result;
@@ -296,12 +296,14 @@ void LoadInfo::FormatSerialize(FormatSerializer &serializer) const {
296
296
  ParseInfo::FormatSerialize(serializer);
297
297
  serializer.WriteProperty(200, "filename", filename);
298
298
  serializer.WriteProperty(201, "load_type", load_type);
299
+ serializer.WriteProperty(202, "repository", repository);
299
300
  }
300
301
 
301
302
  unique_ptr<ParseInfo> LoadInfo::FormatDeserialize(FormatDeserializer &deserializer) {
302
303
  auto result = duckdb::unique_ptr<LoadInfo>(new LoadInfo());
303
304
  deserializer.ReadProperty(200, "filename", result->filename);
304
305
  deserializer.ReadProperty(201, "load_type", result->load_type);
306
+ deserializer.ReadProperty(202, "repository", result->repository);
305
307
  return std::move(result);
306
308
  }
307
309
 
@@ -1872,6 +1872,7 @@ typedef enum PGLoadInstallType { PG_LOAD_TYPE_LOAD, PG_LOAD_TYPE_INSTALL, PG_LO
1872
1872
  typedef struct PGLoadStmt {
1873
1873
  PGNodeTag type;
1874
1874
  const char *filename; /* file to load */
1875
+ const char *repository; /* optionally, the repository to load from */
1875
1876
  PGLoadInstallType load_type;
1876
1877
  } PGLoadStmt;
1877
1878