{"record":{"id":"846a6d44d54b9ab6","repo":"risingwavelabs/risingwave","slug":"unsupported-type","errorCode":null,"errorMessage":"unsupported type: {:?}","messagePattern":"unsupported type: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/connector/src/connector_common/postgres.rs","lineNumber":854,"sourceCode":"                            PgKind::Enum(vec![]),\n                            \"\".into(),\n                        )),\n                        \"\".into(),\n                    ))\n                }\n                _ => bail!(\"unsupported array type: {:?}\", t),\n            }\n        }\n        SeaType::Unknown(name) => {\n            // Treat as enum type\n            Ok(PgType::new(\n                name.clone(),\n                0,\n                PgKind::Enum(vec![]),\n                \"\".into(),\n            ))\n        }\n        _ => bail!(\"unsupported type: {:?}\", sea_type),\n    }\n}\n\n#[cfg(test)]\nmod tests {\n    use super::{\n        format_grant_table_privilege, format_grant_usage, format_pg_table_name,\n        format_required_table_grants, parse_pgvector_dimension,\n    };\n\n    #[test]\n    fn test_parse_pgvector_dimension() {\n        assert_eq!(parse_pgvector_dimension(\"vector(3)\").unwrap(), Some(3));\n        assert_eq!(parse_pgvector_dimension(\"VECTOR(768)\").unwrap(), Some(768));\n        assert_eq!(parse_pgvector_dimension(\"varchar\").unwrap(), None);\n    }\n\n    #[test]","sourceCodeStart":836,"sourceCodeEnd":872,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/connector_common/postgres.rs#L836-L872","documentation":"The fallback arm of sea_type_to_pg_type: any SeaType that is not an Array or Unknown (enum-treatable) type has no PostgreSQL mapping, so the mapper bails. It indicates the source column type is not supported by the Postgres sink type mapper.","triggerScenarios":"Creating a Postgres sink where a column resolves to a SeaType variant with no mapping arm (e.g. unsupported struct/complex types) — type_mapping iterates columns and hits the terminal `_ => bail!`.","commonSituations":"Sinking tables containing unsupported complex column types (nested structs, unsupported temporal/custom types) to Postgres; upgrading RisingWave with new types whose sink mapping is missing.","solutions":["Change the column to a Postgres-supported type (numeric, text, timestamp, bool, bytea, etc.)","Cast the column to a supported type in the sink query","Upgrate RisingWave to a version that maps the type, or file an issue to add the mapping"],"exampleFix":"// before\ncol struct<a int>  -- unsupported for pg sink\n// after\ncol jsonb  -- cast struct to jsonb","handlingStrategy":"validation","validationCode":"fn pg_sink_compatible(t: &DataType) -> bool {\n    !matches!(t, DataType::Struct(_) | DataType::List(_))\n}\n// validate every column of the sink target before CREATE SINK","typeGuard":"fn is_simple_type(t: &DataType) -> bool {\n    !matches!(t, DataType::Struct(_) | DataType::List(_) | DataType::Map(_))\n}","tryCatchPattern":null,"preventionTips":["Design sink schemas with Postgres-native types","Cast struct/map columns to JSONB before sinking","Pin and test the RisingWave version's type-mapping matrix"],"tags":["postgres","sink","type-mapping"],"backgroundTag":"unsupported-dtype","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"}