Summary
Currently, some pg type for example like Composite and Array Composite will fail cause:
|
// Fail fast on any type that we are not able to parse in try_from_str. |
|
let typ = Type::from_oid(type_oid).ok_or_else(|| { |
|
ReplicationClientError::UnsupportedType( |
|
name.clone(), |
|
type_oid, |
|
table_name.to_string(), |
|
) |
|
})?; |
In addition, the multi-dim Array is also rejected cause the check:
|
let attndims: i32 = row |
|
.try_get("attndims")? |
|
.ok_or(ReplicationClientError::MissingColumn( |
|
"attndims".to_string(), |
|
"pg_attribute".to_string(), |
|
))? |
|
.parse() |
|
.map_err(|_| ReplicationClientError::TypeModifierColumnNotI32)?; |
|
|
|
if matches!(typ.kind(), Kind::Array(_)) && attndims > 1 { |
|
return Err(ReplicationClientError::UnsupportedType( |
|
name.clone(), |
|
type_oid, |
|
table_name.to_string(), |
|
)); |
|
} |
Context
Why is this issue important? Link any relevant discussions, designs, or documents.
Tasks
Notes
I got a draft patch which aims to add integration testing of pg row parsing and try to make PG Replication Client to support Composite and Array of Composite:
https://github.com/Mooncake-Labs/moonlink/compare/main...peterxcli:feat/support-customize-type-in-pg-replication-client?expand=1
Remember to follow the type matching rule introduced in #1301 or its following...
Summary
Currently, some pg type for example like Composite and Array Composite will fail cause:
moonlink/src/moonlink_connectors/src/pg_replicate/clients/postgres.rs
Lines 261 to 268 in db080d5
In addition, the multi-dim Array is also rejected cause the check:
moonlink/src/moonlink_connectors/src/pg_replicate/clients/postgres.rs
Lines 287 to 302 in db080d5
Context
Why is this issue important? Link any relevant discussions, designs, or documents.
Tasks
CompositesupportCompositesupportArrayinComposite's fieldCompositeNotes
I got a draft patch which aims to add integration testing of pg row parsing and try to make PG Replication Client to support
Compositeand Array ofComposite:https://github.com/Mooncake-Labs/moonlink/compare/main...peterxcli:feat/support-customize-type-in-pg-replication-client?expand=1
Remember to follow the type matching rule introduced in #1301 or its following...