@@ -37,10 +37,15 @@ PostgresCatalog::CreateSchema(duckdb::CatalogTransaction, duckdb::CreateSchemaIn
37
37
}
38
38
39
39
duckdb::optional_ptr<duckdb::SchemaCatalogEntry>
40
- PostgresCatalog::GetSchema (duckdb::CatalogTransaction catalog_transaction, const duckdb::string &schema_name ,
41
- duckdb::OnEntryNotFound , duckdb::QueryErrorContext ) {
40
+ PostgresCatalog::LookupSchema (duckdb::CatalogTransaction catalog_transaction,
41
+ const duckdb::EntryLookupInfo &schema_lookup , duckdb::OnEntryNotFound ) {
42
42
auto &pg_transaction = catalog_transaction.transaction ->Cast <PostgresTransaction>();
43
- auto res = pg_transaction.GetCatalogEntry (duckdb::CatalogType::SCHEMA_ENTRY, schema_name, " " );
43
+ const auto catalog_type = schema_lookup.GetCatalogType ();
44
+ if (catalog_type != duckdb::CatalogType::SCHEMA_ENTRY) {
45
+ throw duckdb::NotImplementedException (" LookupSchema only supports SCHEMA_ENTRY" );
46
+ }
47
+
48
+ auto res = pg_transaction.GetCatalogEntry (catalog_type, schema_lookup.GetEntryName (), " " );
44
49
D_ASSERT (res);
45
50
D_ASSERT (res->type == duckdb::CatalogType::SCHEMA_ENTRY);
46
51
return (duckdb::SchemaCatalogEntry *)res.get ();
50
55
PostgresCatalog::ScanSchemas (duckdb::ClientContext &, std::function<void (duckdb::SchemaCatalogEntry &)>) {
51
56
}
52
57
53
- duckdb::unique_ptr<duckdb:: PhysicalOperator>
54
- PostgresCatalog::PlanCreateTableAs (duckdb::ClientContext &, duckdb::LogicalCreateTable &,
55
- duckdb::unique_ptr< duckdb::PhysicalOperator> ) {
58
+ duckdb::PhysicalOperator &
59
+ PostgresCatalog::PlanCreateTableAs (duckdb::ClientContext &, duckdb::PhysicalPlanGenerator &,
60
+ duckdb::LogicalCreateTable &, duckdb::PhysicalOperator & ) {
56
61
throw duckdb::NotImplementedException (" PlanCreateTableAs not supported yet" );
57
62
}
58
63
59
- duckdb::unique_ptr<duckdb:: PhysicalOperator>
60
- PostgresCatalog::PlanInsert (duckdb::ClientContext &, duckdb::LogicalInsert &,
61
- duckdb::unique_ptr <duckdb::PhysicalOperator>) {
64
+ duckdb::PhysicalOperator &
65
+ PostgresCatalog::PlanInsert (duckdb::ClientContext &, duckdb::PhysicalPlanGenerator &, duckdb:: LogicalInsert &,
66
+ duckdb::optional_ptr <duckdb::PhysicalOperator>) {
62
67
throw duckdb::NotImplementedException (" PlanInsert not supported yet" );
63
68
}
64
69
65
- duckdb::unique_ptr<duckdb:: PhysicalOperator>
66
- PostgresCatalog::PlanDelete (duckdb::ClientContext &, duckdb::LogicalDelete &,
67
- duckdb::unique_ptr<duckdb:: PhysicalOperator> ) {
70
+ duckdb::PhysicalOperator &
71
+ PostgresCatalog::PlanDelete (duckdb::ClientContext &, duckdb::PhysicalPlanGenerator &, duckdb:: LogicalDelete &,
72
+ duckdb::PhysicalOperator & ) {
68
73
throw duckdb::NotImplementedException (" PlanDelete not supported yet" );
69
74
}
70
75
71
- duckdb::unique_ptr<duckdb:: PhysicalOperator>
72
- PostgresCatalog::PlanUpdate (duckdb::ClientContext &, duckdb::LogicalUpdate &,
73
- duckdb::unique_ptr<duckdb:: PhysicalOperator> ) {
76
+ duckdb::PhysicalOperator &
77
+ PostgresCatalog::PlanUpdate (duckdb::ClientContext &, duckdb::PhysicalPlanGenerator &, duckdb:: LogicalUpdate &,
78
+ duckdb::PhysicalOperator & ) {
74
79
throw duckdb::NotImplementedException (" PlanUpdate not supported yet" );
75
80
}
76
81
0 commit comments