{"record":{"id":"1f0762ee4ea1748b","repo":"risingwavelabs/risingwave","slug":"the-upstream-table-name-must-contain-schema-name-p","errorCode":null,"errorMessage":"The upstream table name must contain schema name prefix, e.g. 'public.table'","messagePattern":"The upstream table name must contain schema name prefix, e\\.g\\. 'public\\.table'","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/frontend/src/handler/create_table.rs","lineNumber":1185,"sourceCode":"                _ => current.push(ch),\n            }\n        }\n    }\n\n    if in_quote || current.is_empty() {\n        return Err(anyhow!(\n            \"Invalid Postgres CDC table name '{}'. Expected 'schema.table'.\",\n            external_table_name\n        )\n        .into());\n    }\n    parts.push(current);\n\n    if let [schema_name, table_name] = parts.as_slice() {\n        Ok((schema_name.clone(), table_name.clone()))\n    } else {\n        Err(\n            anyhow!(\"The upstream table name must contain schema name prefix, e.g. 'public.table'\")\n                .into(),\n        )\n    }\n}\n\n/// Reject `CREATE TABLE` when a primary-key column is filtered out of Debezium change-event\n/// values via `debezium.column.exclude.list` or `debezium.column.include.list`.\n///\n/// Debezium's column filters only apply to the change-event **value** payload. Message keys are\n/// always built from the upstream PRIMARY KEY and are not affected. If a PK column is filtered out\n/// of the value, RisingWave reads NULL for that PK column from the payload, causing silent data\n/// corruption: UPDATE turns into a fresh INSERT (PK mismatch with the original row) and DELETE\n/// silently no-ops.\n///\n/// Debezium entries are regex patterns matched against the fully qualified column name\n/// `<namespace>.<table>.<column>`, where namespace is `schema` for Postgres / SQL Server and\n/// `database` for MySQL.\nfn reject_pk_filtered_by_debezium_column_filter(","sourceCodeStart":1167,"sourceCodeEnd":1203,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/frontend/src/handler/create_table.rs#L1167-L1203","documentation":"After parsing succeeds lexically, `parse_postgres_cdc_external_table_name` requires exactly 2 parts — schema and table. A 1-part name ('users') or 3+-part name ('db.public.users') is rejected because the Postgres CDC source needs the schema prefix to resolve the replication slot's table and build the Debezium topic name.","triggerScenarios":"table_name = 'users' (no schema) or 'mydb.public.users' in a postgres-cdc CREATE TABLE option.","commonSituations":"Users omit 'public.' assuming a default schema; users copy a SQL Server style 3-part name; database name included out of habit from connection strings.","solutions":["Prefix the schema explicitly: 'public.users' instead of 'users'.","Remove the database prefix — specify the database via the database_name option, not in the table name.","For non-default schemas, use 'myschema.mytable'.","For mixed-case or reserved-word identifiers, quote whole segments: '\"MySchema\".\"MyTable\"'."],"exampleFix":"// before\nWITH (connector = 'postgres-cdc', table_name = 'mydb.public.users')\n// after\nWITH (connector = 'postgres-cdc', database_name = 'mydb', table_name = 'public.users')","handlingStrategy":"validation","validationCode":"const segs = name.split('.');\nif (segs.length !== 2) throw new Error(`Postgres CDC needs exactly 'schema.table', got: ${name}`);","typeGuard":"const isSchemaQualified = (n) => n.split('.').length === 2 && n.split('.').every(s => s.length > 0);","tryCatchPattern":null,"preventionTips":["Always include the schema ('public.') even for default-schema tables.","Pass the database name via the database_name option, never inside the table name.","Enforce the 2-part rule in DDL generators with a unit test."],"tags":["cdc","postgres","table-name-format","schema-qualification"],"backgroundTag":"invalid-argument-format","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"}