Skip to content

Commit

Permalink
fix: allow special server_version such as TDE
Browse files Browse the repository at this point in the history
# show server_version;
 server_version
----------------
 15.8_TDE_1.1.8
(1 row)
  • Loading branch information
marcofoyer authored Dec 3, 2024
1 parent 1155104 commit 033e400
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion agents/plugins/mk_postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def get_server_version(self):
out = self.run_sql_as_db_user("SHOW server_version;")
if out == "":
raise PostgresPsqlError("psql connection returned with no data")
version_as_string = out.split()[0]
version_as_string = out.split("_")[0]
# Use Major and Minor version for float casting: "12.6.4" -> 12.6
return float(".".join(version_as_string.split(".")[0:2]))

Expand Down

0 comments on commit 033e400

Please sign in to comment.