From 0dd97d911569cdedab07f504b708036d62ff83c1 Mon Sep 17 00:00:00 2001 From: Kauan Curbani <87383246+KauanCurbani@users.noreply.github.com> Date: Mon, 9 Sep 2024 12:40:45 -0300 Subject: [PATCH] feat(sql): added uuid type in postgres decoder (#1375) Co-authored-by: Kauan Curbani Co-authored-by: Fabian-Lars --- .changes/sql-uuid-type.md | 5 +++++ plugins/sql/src/decode/postgres.rs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changes/sql-uuid-type.md diff --git a/.changes/sql-uuid-type.md b/.changes/sql-uuid-type.md new file mode 100644 index 00000000..879104b8 --- /dev/null +++ b/.changes/sql-uuid-type.md @@ -0,0 +1,5 @@ +--- +"sql": patch +--- + +Added support for `UUID` columns to the postgres implementation. \ No newline at end of file diff --git a/plugins/sql/src/decode/postgres.rs b/plugins/sql/src/decode/postgres.rs index e38ad025..6f689dce 100644 --- a/plugins/sql/src/decode/postgres.rs +++ b/plugins/sql/src/decode/postgres.rs @@ -14,7 +14,7 @@ pub(crate) fn to_json(v: PgValueRef) -> Result { } let res = match v.type_info().name() { - "CHAR" | "VARCHAR" | "TEXT" | "NAME" => { + "CHAR" | "VARCHAR" | "TEXT" | "NAME" | "UUID" => { if let Ok(v) = ValueRef::to_owned(&v).try_decode() { JsonValue::String(v) } else {