src/go/plugin/go.d/modules/postgres/queries.go
File queries.go
has 693 lines of code (exceeds 500 allowed). Consider refactoring. Open
Open
// SPDX-License-Identifier: GPL-3.0-or-later
package postgres
func queryServerVersion() string {
Function queryReplicationSlotFiles
has 104 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func queryReplicationSlotFiles(version int) string {
if version < pgVersion11 {
return `
WITH wal_size AS (
SELECT
Function queryBloat
has 72 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func queryBloat() string {
return `
SELECT
current_database() AS db, schemaname, tablename, reltuples::bigint AS tups, relpages::bigint AS pages, otta,
ROUND(CASE WHEN otta=0 OR sml.relpages=0 OR sml.relpages=otta THEN 0.0 ELSE sml.relpages/otta::numeric END,1) AS tbloat,