-def _setup_postgres_sql(conn):
- """ Set up a dictionary with various Postgresql/Postgis SQL terms which
- are dependent on the database version in use.
- """
- out = {}
- pg_version = conn.server_version_tuple()
- # CREATE INDEX IF NOT EXISTS was introduced in PG9.5.
- # Note that you need to ignore failures on older versions when
- # using this construct.
- out['if_index_not_exists'] = ' IF NOT EXISTS ' if pg_version >= (9, 5, 0) else ''
-
- return out
-
-
-def _setup_postgresql_features(conn):