{"record":{"id":"4dd2e1aeca3070db","repo":"dbt-labs/dbt-core","slug":"postgresql-s-list-relations-schemas","errorCode":null,"errorMessage":"PostgreSQL's list_relations_schemas","messagePattern":"PostgreSQL's list_relations_schemas","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-adapter/src/metadata/postgres/mod.rs","lineNumber":157,"sourceCode":"                },\n            };\n\n            columns_by_relation\n                .entry(fully_qualified_name.clone())\n                .or_insert(BTreeMap::new())\n                .insert(column_name.to_string(), column);\n        }\n        Ok(columns_by_relation)\n    }\n\n    fn list_relations_schemas_inner(\n        &self,\n        _unique_id: Option<String>,\n        _phase: Option<ExecutionPhase>,\n        _relations: &[Arc<dyn BaseRelation>],\n        _token: CancellationToken,\n    ) -> AsyncAdapterResult<'_, HashMap<String, AdapterResult<Arc<Schema>>>> {\n        let future = async move { todo!(\"PostgreSQL's list_relations_schemas\") };\n        Box::pin(future)\n    }\n\n    fn list_relations_schemas_by_patterns_inner(\n        &self,\n        _patterns: &[RelationPattern],\n        _token: CancellationToken,\n    ) -> AsyncAdapterResult<'_, Vec<(String, AdapterResult<RelationSchemaPair>)>> {\n        todo!(\"PostgresAdapter::list_relations_schemas_by_patterns\")\n    }\n\n    fn freshness_inner(\n        &self,\n        _relations: &[Arc<dyn BaseRelation>],\n        _token: CancellationToken,\n    ) -> AsyncAdapterResult<'_, BTreeMap<String, MetadataFreshness>> {\n        todo!(\"PostgresAdapter::freshness\")\n    }","sourceCodeStart":139,"sourceCodeEnd":175,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-adapter/src/metadata/postgres/mod.rs#L139-L175","documentation":"This is a Rust `todo!()` panic inside the PostgreSQL adapter trait implementation: `list_relations_schemas_inner` is a required trait method that was left unimplemented, so calling list_relations_schemas on a PostgresAdapter panics with 'PostgreSQL's list_relations_schemas'. It marks unfinished batch schema-loading functionality, not a Postgres server failure.","triggerScenarios":"Invoking the list_relations_schemas operation (which fans out to `list_relations_schemas_inner` at crates/dbt-adapter/src/metadata/postgres/mod.rs:157) on a PostgresAdapter; the stubbed future immediately panics.","commonSituations":"A dbt workflow that requests schemas for many relations in one batch (e.g. caching all schemas before a run) against Postgres while this batch API is still a stub; any caller of the batch endpoints hits the panic regardless of database health.","solutions":["Use the per-relation/single get_relation path that is implemented instead of the batch list_relations_schemas API","Implement list_relations_schemas_inner (e.g. batched INFORMATION_SCHEMA.TABLES queries grouped per schema) in PostgresAdapter","Update/pin to a dbt-adapter version where the Postgres batch implementation exists","Feature-gate or route around batch schema loading until the implementation lands"],"exampleFix":"// before\nlet future = async move { todo!(\"PostgreSQL's list_relations_schemas\") };\n// after\nlet future = async move {\n    let mut out = HashMap::new();\n    for rel in relations {\n        out.insert(rel.identifier().to_string(), load_schema(conn, rel).await?);\n    }\n    Ok(out)\n};","handlingStrategy":"try-catch","validationCode":"// call only if batch schema loading is available\nif !adapter.supports_batch_schema_loading() {\n    return Err(\"Postgres batch list_relations_schemas unavailable; use per-relation lookup\".into());\n}","typeGuard":"fn has_batch_schemas(a: &dyn Adapter) -> bool { a.capabilities().list_relations_schemas }","tryCatchPattern":"match std::panic::AssertUnwindSafe(adapter.list_relations_schemas(...)).catch_unwind().await {\n    Ok(res) => res,\n    Err(_) => per_relation_schema_fallback(relations).await,\n}","preventionTips":["Feature-detect batch APIs before calling them instead of assuming trait coverage","Provide a per-relation fallback path for unimplemented batch endpoints","Track trait methods still marked todo!() in your adapter choice","Pin adapter versions after batch endpoints are implemented"],"tags":["rust","todo-panic","postgres","unimplemented"],"backgroundTag":"method-not-implemented","analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}