Skip to content

Commit

Permalink
fix: handle pg 7.16.0+ undefined Result#fields (#1179)
Browse files Browse the repository at this point in the history
  • Loading branch information
kjin authored Jan 2, 2020
1 parent 6a02ee3 commit 21dbb0d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/plugin-pg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ function populateLabelsFromOutputs(
span.addLabel('row_count', res.rowCount);
span.addLabel('oid', res.oid);
span.addLabel('rows', res.rows);
span.addLabel('fields', res.fields);
// Starting in pg@7.16.0, res.fields could be undefined.
span.addLabel('fields', res.fields || []);
}
}

Expand Down

0 comments on commit 21dbb0d

Please sign in to comment.