lib/sensu-plugins-postgres/pgutil.rb in sensu-plugins-postgres-3.0.0 vs lib/sensu-plugins-postgres/pgutil.rb in sensu-plugins-postgres-4.0.0
- old
+ new
@@ -1,4 +1,6 @@
+# frozen_string_literal: true
+
module PgUtil
def check_vsn_newer_than_postgres9(conn)
pg_vsn = conn.exec("SELECT current_setting('server_version')").getvalue(0, 0)
pg_vsn = pg_vsn.split(' ')[0]
Gem::Version.new(pg_vsn) < Gem::Version.new('10.0') && Gem::Version.new(pg_vsn) >= Gem::Version.new('9.0')