Commit ee6ea398 authored by Michael Tremer's avatar Michael Tremer

Revert "importer: Purge any redundant entries"

This reverts commit c2cc55d5.

The query stalls the database and therefore the automatic
scripts are no longer able to generate a new version of the
database.
Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent 158c22d4
......@@ -374,27 +374,7 @@ class CLI(object):
INSERT INTO autnums(number, name)
SELECT _autnums.number, _organizations.name FROM _autnums
JOIN _organizations ON _autnums.organization = _organizations.handle
ON CONFLICT (number) DO UPDATE SET name = excluded.name
""")
self.db.execute("""
--- Purge any redundant entries
CREATE TEMPORARY TABLE _garbage ON COMMIT DROP
AS
SELECT network FROM networks candidates
WHERE EXISTS (
SELECT FROM networks
WHERE
networks.network << candidates.network
AND
networks.country = candidates.country
);
CREATE UNIQUE INDEX _garbage_search ON _garbage USING BTREE(network);
DELETE FROM networks WHERE EXISTS (
SELECT FROM _garbage WHERE networks.network = _garbage.network
);
ON CONFLICT (number) DO UPDATE SET name = excluded.name;
""")
# Download all extended sources
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment