Skip to content

Commit

Permalink
feat: support bpchar column type (#687)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chloe Kim authored Jan 20, 2023
1 parent 9a4abd5 commit 7b824f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dozer-ingestion/src/connectors/postgres/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub fn postgres_type_to_field(
.parse::<f64>()
.unwrap(),
))),
Type::TEXT | Type::VARCHAR | Type::CHAR => {
Type::TEXT | Type::VARCHAR | Type::CHAR | Type::BPCHAR => {
Ok(Field::String(String::from_utf8(v.to_vec()).unwrap()))
}
Type::BYTEA => Ok(Field::Binary(v.to_vec())),
Expand Down Expand Up @@ -80,7 +80,7 @@ pub fn postgres_type_to_dozer_type(column_type: Type) -> Result<FieldType, Postg
match column_type {
Type::BOOL => Ok(FieldType::Boolean),
Type::INT2 | Type::INT4 | Type::INT8 => Ok(FieldType::Int),
Type::CHAR | Type::TEXT | Type::VARCHAR => Ok(FieldType::String),
Type::CHAR | Type::TEXT | Type::VARCHAR | Type::BPCHAR => Ok(FieldType::String),
Type::FLOAT4 | Type::FLOAT8 => Ok(FieldType::Float),
Type::BIT => Ok(FieldType::Binary),
Type::TIMESTAMP | Type::TIMESTAMPTZ => Ok(FieldType::Timestamp),
Expand Down

0 comments on commit 7b824f4

Please sign in to comment.