- # CREATE INDEX IF NOT EXISTS was introduced in PG9.5.
- # Note that you need to ignore failures on older versions when
- # unsing this construct.
- out['if_index_not_exists'] = ' IF NOT EXISTS ' if pg_version >= (9, 5, 0) else ''
-
- return out
-
+ postgis_version = conn.postgis_version_tuple()
+ return {
+ 'has_index_non_key_column': pg_version >= (11, 0, 0),
+ 'spgist_geom' : 'SPGIST' if postgis_version >= (3, 0) else 'GIST'
+ }