Skip to content
This repository was archived by the owner on Jan 21, 2026. It is now read-only.

Commit 21dbb0d

Browse files
authored
fix: handle pg 7.16.0+ undefined Result#fields (#1179)
1 parent 6a02ee3 commit 21dbb0d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/plugins/plugin-pg.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ function populateLabelsFromOutputs(
6161
span.addLabel('row_count', res.rowCount);
6262
span.addLabel('oid', res.oid);
6363
span.addLabel('rows', res.rows);
64-
span.addLabel('fields', res.fields);
64+
// Starting in pg@7.16.0, res.fields could be undefined.
65+
span.addLabel('fields', res.fields || []);
6566
}
6667
}
6768

0 commit comments

Comments
 (0)