# and leave -I out.
for state in data/census2000/*; do \
for shapefile in $$state/lines/*.shp; do \
+ echo "Importing $$shapefile."; \
$(PG_BINDIR)/shp2pgsql \
-a \
-s $(TIGER_SRID) \
- -D \
$$shapefile \
tiger_lines \
- | psql -U $(DB_USER) -d $(DB_NAME); \
+ | bin/filter-transactions \
+ | psql -U $(DB_USER) -d $(DB_NAME) \
+ > /dev/null; \
done; \
done;
tiger_lines \
| psql -U postgres -d $(DB_NAME) \
> /dev/null
+
+# Add a unique index on the "tlid" column.
+ psql -U postgres \
+ -d census \
+ -f sql/create_tlid_unique_index.sql