Skip to content

Commit 3638a2b

Browse files
authored
Merge pull request #2555 from jaltavilla/load-types-errcheck
Add missing error check of rows.Err to load types.
2 parents 82b212c + 5048785 commit 3638a2b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

derived_types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,11 @@ func (c *Conn) LoadTypes(ctx context.Context, typeNames []string) ([]*pgtype.Typ
236236
}
237237
result = append(result, type_)
238238
}
239+
240+
if err := rows.Err(); err != nil {
241+
return nil, fmt.Errorf("While processing rows: %w", err)
242+
}
243+
239244
return result, nil
240245
}
241246

0 commit comments

Comments
 (0)