Postgres: Fix JSON data type mapping with PGX driver (#110566)

This commit is contained in:
Diego Giagio
2025-09-05 02:39:56 -04:00
committed by GitHub
parent 5872672042
commit 554cd6f198
2 changed files with 24 additions and 5 deletions
@@ -502,6 +502,15 @@ func convertResultsToFrame(results []*pgconn.Result, rowLimit int64) (*data.Fram
return nil, err
}
row[colIdx] = d
case pgtype.JSONOID, pgtype.JSONBOID:
var d *string
scanPlan := m.PlanScan(dataTypeOID, format, &d)
err := scanPlan.Scan(rawValue, &d)
if err != nil {
return nil, err
}
j := json.RawMessage(*d)
row[colIdx] = &j
default:
var d *string
scanPlan := m.PlanScan(dataTypeOID, format, &d)