Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: handle nullable time (#12866)

p0ny26793398d0c7
diff --git a/backend/api/v1/rollout_service.go b/backend/api/v1/rollout_service.go
index 0a4142dd60..10bbe93638 100644
--- a/backend/api/v1/rollout_service.go
+++ b/backend/api/v1/rollout_service.go
@@ -333,7 +333,8 @@ func getSession(ctx context.Context, engine storepb.Engine, db *sql.DB, connID s
var blockedByPids pgtype.TextArray
- var bs, xs, qs time.Time
+ var bs time.Time
+ var xs, qs *time.Time
if err := rows.Scan(
&s.Pid,
&blockedByPids,
@@ -358,8 +359,12 @@ func getSession(ctx context.Context, engine storepb.Engine, db *sql.DB, connID s
}
s.BackendStart = timestamppb.New(bs)
- s.XactStart = timestamppb.New(xs)
- s.QueryStart = timestamppb.New(qs)
+ if xs != nil {
+ s.XactStart = timestamppb.New(*xs)
+ }
+ if qs != nil {
+ s.QueryStart = timestamppb.New(*qs)
+ }
if s.Pid == connID {
ss.Session = &s