PostgreSQL: Check for null in JSON columns (#111747)

This commit is contained in:
Zoltán Bedi
2025-09-29 18:28:07 +02:00
committed by GitHub
parent 52eaa77bdd
commit 117e357cc9
4 changed files with 301 additions and 0 deletions
@@ -550,6 +550,10 @@ func convertPostgresValue(rawValue []byte, fd pgconn.FieldDescription, m *pgtype
if err != nil {
return nil, err
}
// Handle null JSON values
if d == nil {
return nil, nil
}
j := json.RawMessage(*d)
return &j, nil
default: