Skip to content

Commit

Permalink
Merge pull request #48 from WcaleNieWolny/fix_boolean_values
Browse files Browse the repository at this point in the history
fix: boolean parsing
  • Loading branch information
imor authored Oct 27, 2024
2 parents b0f1a85 + e0361d3 commit f3cce3c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pg_replicate/src/conversions/cdc_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ impl CdcEventConverter {
match *typ {
Type::BOOL => {
let val = from_utf8(bytes)?;
let val: bool = val.parse()?;
let val = match val {
"t" => true,
"f" => false,
_ => val.parse()?
};
Ok(Cell::Bool(val))
}
// Type::BYTEA => Ok(Value::Bytes(bytes.to_vec())),
Expand Down

0 comments on commit f3cce3c

Please sign in to comment.