- pg_version = server_version_tuple(conn)
- postgis_version = postgis_version_tuple(conn)
- pg11plus = pg_version >= (11, 0, 0)
- ps3 = postgis_version >= (3, 0)
- return {
- 'has_index_non_key_column': pg11plus,
- 'spgist_geom' : 'SPGIST' if pg11plus and ps3 else 'GIST'
- }