This PR fixes https://github.com/electric-sql/electric/issues/1712.
We were previously reading out server_version which is a string and were casting it to an integer in order to get PG's major version number. However, casting to integer does not work when the server_version is set to e.g. 16.4 (Debian 16.4-1.pgdg1123+1) which some providers do. This PR changes this such that we no longer cast the string but instead read the version number from the server_version_num setting which is an integer (cf. https://pgpedia.info/s/server_version_num.html and https://pgpedia.info/s/server_version_num.html).
This PR fixes https://github.com/electric-sql/electric/issues/1712. We were previously reading out
server_version
which is a string and were casting it to an integer in order to get PG's major version number. However, casting to integer does not work when theserver_version
is set to e.g.16.4 (Debian 16.4-1.pgdg1123+1)
which some providers do. This PR changes this such that we no longer cast the string but instead read the version number from theserver_version_num
setting which is an integer (cf. https://pgpedia.info/s/server_version_num.html and https://pgpedia.info/s/server_version_num.html).