def is_search_path_fixed(connection):
    """Check if a security issue with `search_path` is fixed in the current PG version.

    Ref: CVE-2018-1058.
    """
    version = connection.server_version
    return (
        version >= 100003
        or 90608 <= version < 100000
        or 90512 <= version < 90600
        or 90417 <= version < 90500
        or 90322 <= version < 90400
    )