mirror of
https://github.com/maplibre/martin.git
synced 2024-12-19 04:41:46 +03:00
Fix Postgis version check (#23) (h/t [Krizz](https://github.com/Krizz))
Fixes Postgis version check to allow Beta/RC versions
This commit is contained in:
parent
ac076834bf
commit
856c93c338
@ -25,7 +25,7 @@ pub fn select_postgis_verion(pool: &PostgresPool) -> io::Result<String> {
|
||||
.map_err(|err| io::Error::new(io::ErrorKind::Other, err.description()))?;
|
||||
|
||||
let version: String = conn
|
||||
.query("select postgis_lib_version()", &[])
|
||||
.query(r#"select (regexp_matches(postgis_lib_version(), '^(\d+\.\d+\.\d+)', 'g'))[1] as postgis_lib_version"#, &[])
|
||||
.map(|rows| rows.get(0).get("postgis_lib_version"))?;
|
||||
|
||||
Ok(version)
|
||||
|
Loading…
Reference in New Issue
Block a user