]> gitweb.michael.orlitzky.com - dead/census-tools.git/blobdiff - sql/create_tlid_unique_index.sql
Added a unique index on the tiger_lines "tlid" column.
[dead/census-tools.git] / sql / create_tlid_unique_index.sql
diff --git a/sql/create_tlid_unique_index.sql b/sql/create_tlid_unique_index.sql
new file mode 100644 (file)
index 0000000..3a0d385
--- /dev/null
@@ -0,0 +1,8 @@
+/*
+  The TIGER/Line ID (tlid) for each line is supposed to be
+  unique. If it isn't, problems, so we enforce it in the
+  database.
+*/
+
+CREATE UNIQUE INDEX idx_tiger_lines_tlid_unique
+       ON tiger_lines (tlid);