X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/71249bd94a1bd698a937983663f06a9376629ae6..3742fa2929619a4c54a50d3e79e0eeadb4d6ca6f:/src/nominatim_db/db/sql_preprocessor.py diff --git a/src/nominatim_db/db/sql_preprocessor.py b/src/nominatim_db/db/sql_preprocessor.py index 468f3510..691ab6c5 100644 --- a/src/nominatim_db/db/sql_preprocessor.py +++ b/src/nominatim_db/db/sql_preprocessor.py @@ -10,7 +10,7 @@ Preprocessing of SQL files. from typing import Set, Dict, Any, cast import jinja2 -from .connection import Connection +from .connection import Connection, server_version_tuple, postgis_version_tuple from .async_connection import WorkerPool from ..config import Configuration @@ -66,8 +66,8 @@ def _setup_postgresql_features(conn: Connection) -> Dict[str, Any]: """ Set up a dictionary with various optional Postgresql/Postgis features that depend on the database version. """ - pg_version = conn.server_version_tuple() - postgis_version = conn.postgis_version_tuple() + pg_version = server_version_tuple(conn) + postgis_version = postgis_version_tuple(conn) pg11plus = pg_version >= (11, 0, 0) ps3 = postgis_version >= (3, 0) return {