mirror of
https://github.com/element-hq/synapse.git
synced 2026-11-06 04:28:35 +00:00
`numeric` results had no decoding arm, so `SUM(bigint)`, `AVG(...)` and the `::NUMERIC[]` cast in the room statistics query all failed with "failed to decode column". Decode the wire format (base-10000 digits with a weight and display scale) to its decimal text and hand that to `decimal.Decimal`, which is what psycopg2 returns for these columns. Arrays of numeric decode element-wise through the existing array path. Binding a `Decimal` parameter is still unsupported; Synapse never does. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ULdieJyQoHNzeHq42H2M1p