X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/2c8242c8dfccb74861eb599ecc1064e764bdec99..9c777560cee052d19f8cd555879d10feed89099e:/nominatim/db/sql_preprocessor.py diff --git a/nominatim/db/sql_preprocessor.py b/nominatim/db/sql_preprocessor.py index 80b89c57..c8e07f6e 100644 --- a/nominatim/db/sql_preprocessor.py +++ b/nominatim/db/sql_preprocessor.py @@ -36,7 +36,7 @@ def _setup_tablespace_sql(config): tspace = getattr(config, 'TABLESPACE_{}_{}'.format(subset, kind)) if tspace: tspace = 'TABLESPACE "{}"'.format(tspace) - out['{}_{}'.format(subset.lower, kind.lower())] = tspace + out['{}_{}'.format(subset.lower(), kind.lower())] = tspace return out @@ -46,8 +46,10 @@ def _setup_postgresql_features(conn): depend on the database version. """ pg_version = conn.server_version_tuple() + postgis_version = conn.postgis_version_tuple() return { - 'has_index_non_key_column': pg_version >= (11, 0, 0) + 'has_index_non_key_column': pg_version >= (11, 0, 0), + 'spgist_geom' : 'SPGIST' if postgis_version >= (3, 0) else 'GIST' } class SQLPreprocessor: