fix: bind edited PG cell values via text wire format
Release / windows (push) Failing after 18m23s
Release / linux (push) Canceled after 22m17s

The frontend commits edited cell values as plain strings (and PK locators as
numbers/booleans), but tokio-postgres' String binds only text-ish types and
i64 only int8, so editing integer/boolean/uuid/jsonb/… columns failed with
'cannot convert between the Rust type and the Postgres type'.

Introduce PgText — a ToSql impl that accepts any Postgres type and writes the
value as UTF-8 in text wire format so the server parses it into the column's
own type. NULL binds as SQL NULL. Adds the bytes crate and unit tests.
This commit is contained in:
2026-09-01 05:17:47 +08:00
parent f8321d926f
commit 46e0dc2cee
3 changed files with 143 additions and 18 deletions
+2 -1
View File
@@ -1783,8 +1783,9 @@ dependencies = [
[[package]]
name = "gridline"
version = "0.7.10"
version = "0.7.11"
dependencies = [
"bytes",
"chrono",
"deadpool-postgres",
"indexmap 2.14.0",