{"record":{"id":"57eb1f058ec5e5f0","repo":"quickwit-oss/quickwit","slug":"cannot-join-postgresql-uri-with-path","errorCode":null,"errorMessage":"cannot join PostgreSQL URI `{}` with path `{:?}`","messagePattern":"cannot join PostgreSQL URI `(.+?)` with path `(.+?)`","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-common/src/uri.rs","lineNumber":237,"sourceCode":"        self.uri\n    }\n\n    /// Creates a new [`Uri`] with `path` adjoined to `self`.\n    /// Fails if `path` is absolute.\n    pub fn join<P: AsRef<Path> + std::fmt::Debug>(&self, path: P) -> anyhow::Result<Self> {\n        if path.as_ref().is_absolute() {\n            bail!(\n                \"cannot join URI `{}` with absolute path `{:?}`\",\n                self.uri,\n                path\n            );\n        }\n        let joined = match self.protocol() {\n            Protocol::File => Path::new(&self.uri)\n                .join(path)\n                .to_string_lossy()\n                .to_string(),\n            Protocol::PostgreSQL => bail!(\n                \"cannot join PostgreSQL URI `{}` with path `{:?}`\",\n                self.uri,\n                path\n            ),\n            _ => format!(\n                \"{}{}{}\",\n                self.uri,\n                if self.uri.ends_with('/') { \"\" } else { \"/\" },\n                path.as_ref().display(),\n            ),\n        };\n        Ok(Self {\n            uri: joined,\n            protocol: self.protocol,\n        })\n    }\n\n    /// Attempts to construct a [`Uri`] from a string.","sourceCodeStart":219,"sourceCodeEnd":255,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-common/src/uri.rs#L219-L255","documentation":"`Uri::join` was called on a `postgresql://` URI. PostgreSQL connection URIs encode a database name, not a hierarchical path, so path joining is not meaningful for this protocol and the match arm for Protocol::Postgres refuses the operation.","triggerScenarios":"Thrown at quickwit/quickwit-common/src/uri.rs:237 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Specify the full PostgreSQL URI (including database name) instead of joining a path onto it","Use a file-based or supported protocol URI when path joining is needed"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a39730c5cdcd1a4fe798403737ae293999ea21f8","analyzedAt":"2026-09-08T13:19:37.784Z","contentChangedAt":"2026-09-08T13:19:37.784Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}