NikolayS / postgres_dba

The missing set of useful tools for Postgres DBAs and all engineers
BSD 3-Clause "New" or "Revised" License
1.03k stars 113 forks source link

Improve version handling in SQL scripts. #42

Closed alexeyklyukin closed 4 years ago

alexeyklyukin commented 5 years ago

Avoid parsing version() output with regexps, as it breaks for non-released versions (i.e. devel or beta). Get the value from the server_version_num instead. Remove the version fetch from t1_tuning.sql, as it seems to serve no purpose there.

NikolayS commented 5 years ago

cool, thanks @alexeyklyukin !

I've learned about current_setting('server_version_num') only after I wrote this code. Thanks for the change.