@@ -37,10 +37,15 @@ PostgresCatalog::CreateSchema(duckdb::CatalogTransaction, duckdb::CreateSchemaIn
3737}
3838
3939duckdb::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 ) {
4242 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 (), " " );
4449 D_ASSERT (res);
4550 D_ASSERT (res->type == duckdb::CatalogType::SCHEMA_ENTRY);
4651 return (duckdb::SchemaCatalogEntry *)res.get ();
5055PostgresCatalog::ScanSchemas (duckdb::ClientContext &, std::function<void (duckdb::SchemaCatalogEntry &)>) {
5156}
5257
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 & ) {
5661 throw duckdb::NotImplementedException (" PlanCreateTableAs not supported yet" );
5762}
5863
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>) {
6267 throw duckdb::NotImplementedException (" PlanInsert not supported yet" );
6368}
6469
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 & ) {
6873 throw duckdb::NotImplementedException (" PlanDelete not supported yet" );
6974}
7075
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 & ) {
7479 throw duckdb::NotImplementedException (" PlanUpdate not supported yet" );
7580}
7681
0 commit comments