summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/schema.sql4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/schema.sql b/src/schema.sql
index e09be28..0d9fcb4 100644
--- a/src/schema.sql
+++ b/src/schema.sql
@@ -42,6 +42,10 @@ CREATE TABLE entities(
CREATE UNIQUE INDEX uni_entities_value ON entities(MD5(value));
+CREATE INDEX idx_entities_retryinsert ON entities(id)
+WHERE
+ type = 'uninsertable_line' AND detail IS NULL;
+
CREATE OR REPLACE FUNCTION entity(newValue text, newType entity)
RETURNS TABLE(
id integer,