{"record":{"id":"39281294d472a258","repo":"risingwavelabs/risingwave","slug":"0-392812","errorCode":null,"errorMessage":"{0}","messagePattern":"\\{0\\}","errorType":"error_code","errorClass":"CheckRelationError","httpStatus":null,"severity":"error","filePath":"src/frontend/src/session.rs","lineNumber":857,"sourceCode":"        }\n    }\n\n    pub fn create_table(&mut self, name: String, table: TableCatalog) {\n        self.tables.insert(name, table);\n    }\n\n    pub fn drop_table(&mut self, name: &str) {\n        self.tables.remove(name);\n    }\n\n    pub fn get_table(&self, name: &str) -> Option<&TableCatalog> {\n        self.tables.get(name)\n    }\n}\n\n#[derive(Error, Debug)]\npub enum CheckRelationError {\n    #[error(\"{0}\")]\n    Resolve(#[from] ResolveQualifiedNameError),\n    #[error(\"{0}\")]\n    Catalog(#[from] CatalogError),\n}\n\nimpl From<CheckRelationError> for RwError {\n    fn from(e: CheckRelationError) -> Self {\n        match e {\n            CheckRelationError::Resolve(e) => e.into(),\n            CheckRelationError::Catalog(e) => e.into(),\n        }\n    }\n}\n\nimpl SessionImpl {\n    pub(crate) fn new(\n        env: FrontendEnv,\n        auth_context: AuthContext,","sourceCodeStart":839,"sourceCodeEnd":875,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/frontend/src/session.rs#L839-L875","documentation":"CheckRelationError::Resolve wraps ResolveQualifiedNameError via #[from]; the #[error(\"{0}\")] attribute means the displayed message is the inner error's text. It is produced when a qualified relation name (e.g. schema.table) cannot be resolved against the catalog during relation checks.","triggerScenarios":"Any statement that resolves a possibly-qualified name (schema.table or db.schema.table) where the schema or object path does not exist, e.g. SELECT * FROM nonexistent_schema.t or a bad search_path component.","commonSituations":"Typo in schema prefix; connecting to a different database than expected; case-sensitivity issues with quoted identifiers; default schema missing after session setup.","solutions":["Check the full qualified name and spelling; use SHOW SCHEMAS to list valid schemas.","Quote identifiers to preserve case: SELECT * FROM \"MySchema\".\"MyTable\".","Verify you are connected to the intended database (SHOW DATABASES).","Set search_path correctly or always use fully qualified names."],"exampleFix":"-- before\nSELECT * FROM pub.orders; -- schema 'pub' not found\n\n-- after\nSHOW SCHEMAS;\nSELECT * FROM public.orders;","handlingStrategy":"validation","validationCode":"-- verify the qualified name resolves before querying\nSELECT 1 FROM rw_catalog.rw_schemas WHERE name = 'myschema';\nSELECT 1 FROM rw_catalog.rw_tables WHERE schema_name = 'myschema' AND name = 'mytable';","typeGuard":null,"tryCatchPattern":"match session.check_relation(&qname) {\n    Err(CheckRelationError::Resolve(e)) => {\n        log::warn!(\"bad qualified name: {e}\");\n        suggest_similar_names(&qname);\n    }\n    other => other,\n}","preventionTips":["Always use fully qualified, quoted identifiers in generated SQL.","Verify search_path/database at session start.","Lint SQL against the catalog in CI before deployment.","Watch for case sensitivity: unquoted identifiers fold to lowercase."],"tags":["catalog","name-resolution","sql","frontend"],"backgroundTag":"invalid-identifier","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}