Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

Commit 01df6cf

Browse files
committed
adding coalesce to write usage query
1 parent ab49ccc commit 01df6cf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gauges/write_throughput.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import (
77
)
88

99
var databaseWritingUsageQuery = `
10-
SELECT tup_inserted
11-
, tup_updated
12-
, tup_deleted
10+
SELECT coalesce(tup_inserted, 0) as tup_inserted
11+
, coalesce(tup_updated, 0) as tup_updated
12+
, coalesce(tup_deleted, 0) as tup_deleted
1313
FROM pg_stat_database
1414
WHERE datname = current_database()
1515
`

0 commit comments

Comments
 (0)