You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: bind numeric SQL params as text when an explicit cast is present
The runner has its own bind_sql_primitive used by env.DB.query in
workers (postgate is only used here for SQL parsing/validation, not for
binding). Apply the same workaround as postgate v0.1.6 here: when the
SQL has an explicit cast for a numeric param (e.g. \$N::int, \$N::real),
bind it as text and let Postgres parse via the cast. Bypasses sqlx's
prepared-statement type cache that intermittently mishandles binary i64
/ f64 params, producing "invalid byte sequence for encoding UTF8: 0x00".
Reuses postgate::has_explicit_cast (newly exposed in v0.1.7) instead of
duplicating the helper.
0 commit comments