chiark / gitweb /
Do referential integrity check on every incoming update
[ypp-sc-tools.db-live.git] / yarrg / commod-email-processor
index 3f802ad58f71653ddf77b59a06e06e6658d37634..8acf4c105d118c38d99f49425eea89806c0a0f76 100755 (executable)
@@ -39,7 +39,7 @@ BEGIN {
 use Commods;
 use CommodsDatabase;
 
-setlocale(LC_CTYPE, "en_GB.UTF-8");
+set_ctype_utf8();
 my $parser= new MIME::Parser;
 our $entity;
 
@@ -195,7 +195,7 @@ sub main () {
     pipethrough_run_finish($pt, 'gunzip <$deduped_tsv.gz');
 
 #    print "\n";
-    $dbh->commit();
+    db_chkcommit();
 
     # select * from ((buy natural join commods) natural join stalls) natural join islands;
     # select * from ((sell natural join commods) natural join stalls) natural join islands;