diff --git a/schema/pgsql/schema.sql b/schema/pgsql/schema.sql index 341aed32c..af676c7e7 100644 --- a/schema/pgsql/schema.sql +++ b/schema/pgsql/schema.sql @@ -164,7 +164,7 @@ BEGIN -- row count "1" because of the faked ending result used for the -- cursor loop, whose result set is never used. - IF @@ROWCOUNT > 1 THEN + IF rowCounts > 0 THEN result := 100 * (total_time - problem_time) / total_time; END IF; -- else no data available to be reported